Thomas Huth <th...@linux.vnet.ibm.com> writes: > Delete the unused functions qemu_opt_get_number_del(), > qemu_signalfd_available(), qemu_send_full() and qemu_recv_full(). > > Signed-off-by: Thomas Huth <th...@linux.vnet.ibm.com>
qemu_opt_get_number_del() was added in commit 782730b along with qemu_opt_get_del(), qemu_opt_get_bool_del() and qemu_opt_get_size_del(). It hasn't been used so far, but removing it makes the interface irregular. I'd rather not. Covering all four in tests/test-qemu-opts.c would be nice. qemu_send_full() and qemu_recv_full() complement qemu_write_full(). On the other hand, there's no qemu_read_full(). I don't think keeping the two unused ones hurts, but I don't object to dropping them, either. For what it's worth, glibc provides a macro to solve this problem once and for all: /* Evaluate EXPRESSION, and repeat as long as it returns -1 with `errno' set to EINTR. */ # define TEMP_FAILURE_RETRY(expression) \ (__extension__ \ ({ long int __result; \ do __result = (long int) (expression); \ while (__result == -1L && errno == EINTR); \ __result; })) #endif More elegant than writing the same old boring wrapper around everything that can fail with EINTR. qemu_signalfd_available() is unused since commit 6d32717. It's also the only user of CONFIG_SIGNALFD. If we want to drop it, I recommend dropping CONFIG_SIGNALFD as well.