summary refs log tree commit diff stats
path: root/include/qemu
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 /include/qemu
parentde39a045bd8d2b49e4f3d07976622c29d58e0bac (diff)
downloadfocaccia-qemu-60efffa41b34cc299fed65b67e2c2641846d592b.tar.gz
focaccia-qemu-60efffa41b34cc299fed65b67e2c2641846d592b.zip
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 'include/qemu')
-rw-r--r--include/qemu/osdep.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
index 412962d91a..66ee5bc45d 100644
--- a/include/qemu/osdep.h
+++ b/include/qemu/osdep.h
@@ -501,6 +501,7 @@ int qemu_open(const char *name, int flags, ...);
 int qemu_close(int fd);
 int qemu_unlink(const char *name);
 #ifndef _WIN32
+int qemu_dup_flags(int fd, int flags);
 int qemu_dup(int fd);
 #endif
 int qemu_lock_fd(int fd, int64_t start, int64_t len, bool exclusive);