monitor: simplify functions for getting a dup'd fdset entry
commit60efffa41b34cc299fed65b67e2c2641846d592b
authorDaniel P. Berrangé <berrange@redhat.com>
Thu, 27 Aug 2020 12:27:00 +0000 (27 13:27 +0100)
committerDaniel P. Berrangé <berrange@redhat.com>
Wed, 16 Sep 2020 09:33:48 +0000 (16 10:33 +0100)
tree2a74b654cdb44e7e384de3be9bddb015d99d1f8b
parentde39a045bd8d2b49e4f3d07976622c29d58e0bac
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>
include/monitor/monitor.h
include/qemu/osdep.h
monitor/misc.c
stubs/fdset.c
util/osdep.c