aboutsummaryrefslogtreecommitdiff
path: root/stubs
diff options
context:
space:
mode:
authorDaniel P. Berrangé <berrange@redhat.com>2020-08-27 13:27:00 +0100
committerDaniel P. Berrangé <berrange@redhat.com>2020-09-16 10:33:48 +0100
commit60efffa41b34cc299fed65b67e2c2641846d592b (patch)
tree2a74b654cdb44e7e384de3be9bddb015d99d1f8b /stubs
parentde39a045bd8d2b49e4f3d07976622c29d58e0bac (diff)
downloadqemu-60efffa41b34cc299fed65b67e2c2641846d592b.zip
qemu-60efffa41b34cc299fed65b67e2c2641846d592b.tar.gz
qemu-60efffa41b34cc299fed65b67e2c2641846d592b.tar.bz2
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>
Diffstat (limited to 'stubs')
-rw-r--r--stubs/fdset.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/stubs/fdset.c b/stubs/fdset.c
index 67dd5e1..56b3663 100644
--- a/stubs/fdset.c
+++ b/stubs/fdset.c
@@ -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)
{
}