mirror of
https://github.com/mii443/qemu.git
synced 2025-08-22 23:25:48 +00:00
monitor: simplify functions for getting a dup'd fdset entry
Currently code has to call monitor_fdset_get_fd, then dup the return fd, and then add the duplicate FD back into the fdset. This dance is overly verbose for the caller and introduces extra failure modes which can be avoided by folding all the logic into monitor_fdset_dup_fd_add and removing monitor_fdset_get_fd entirely. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
@ -1,8 +1,9 @@
|
||||
#include "qemu/osdep.h"
|
||||
#include "monitor/monitor.h"
|
||||
|
||||
int monitor_fdset_dup_fd_add(int64_t fdset_id, int dup_fd)
|
||||
int monitor_fdset_dup_fd_add(int64_t fdset_id, int flags)
|
||||
{
|
||||
errno = ENOSYS;
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -11,11 +12,6 @@ int64_t monitor_fdset_dup_fd_find(int dup_fd)
|
||||
return -1;
|
||||
}
|
||||
|
||||
int monitor_fdset_get_fd(int64_t fdset_id, int flags)
|
||||
{
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
void monitor_fdset_dup_fd_remove(int dupfd)
|
||||
{
|
||||
}
|
||||
|
Reference in New Issue
Block a user