diff options
author | Daniel P. Berrangé <berrange@redhat.com> | 2020-08-27 13:27:00 +0100 |
---|---|---|
committer | Daniel P. Berrangé <berrange@redhat.com> | 2020-09-16 10:33:48 +0100 |
commit | 60efffa41b34cc299fed65b67e2c2641846d592b (patch) | |
tree | 2a74b654cdb44e7e384de3be9bddb015d99d1f8b /include/monitor | |
parent | de39a045bd8d2b49e4f3d07976622c29d58e0bac (diff) |
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/monitor')
-rw-r--r-- | include/monitor/monitor.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/monitor/monitor.h b/include/monitor/monitor.h index 1018d754a6..c0170773d4 100644 --- a/include/monitor/monitor.h +++ b/include/monitor/monitor.h @@ -43,8 +43,7 @@ int monitor_read_password(MonitorHMP *mon, ReadLineFunc *readline_func, AddfdInfo *monitor_fdset_add_fd(int fd, bool has_fdset_id, int64_t fdset_id, bool has_opaque, const char *opaque, Error **errp); -int monitor_fdset_get_fd(int64_t fdset_id, int flags); -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); void monitor_fdset_dup_fd_remove(int dup_fd); int64_t monitor_fdset_dup_fd_find(int dup_fd); |