mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06: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:
parent
de39a045bd
commit
60efffa41b
5 changed files with 32 additions and 57 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue