diff mbox

[1/2] qemu_signalfd_available(): remove function due to lack of callers

Message ID 1421845037-5374-2-git-send-email-lersek@redhat.com
State New
Headers show

Commit Message

Laszlo Ersek Jan. 21, 2015, 12:57 p.m. UTC
Noone calls qemu_signalfd_available(), let's remove it.

Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
 include/qemu/compatfd.h |  1 -
 util/compatfd.c         | 19 -------------------
 2 files changed, 20 deletions(-)
diff mbox

Patch

diff --git a/include/qemu/compatfd.h b/include/qemu/compatfd.h
index 6b04877..fc37915 100644
--- a/include/qemu/compatfd.h
+++ b/include/qemu/compatfd.h
@@ -39,6 +39,5 @@  struct qemu_signalfd_siginfo {
 };
 
 int qemu_signalfd(const sigset_t *mask);
-bool qemu_signalfd_available(void);
 
 #endif
diff --git a/util/compatfd.c b/util/compatfd.c
index 341ada6..e857150 100644
--- a/util/compatfd.c
+++ b/util/compatfd.c
@@ -108,22 +108,3 @@  int qemu_signalfd(const sigset_t *mask)
 
     return qemu_signalfd_compat(mask);
 }
-
-bool qemu_signalfd_available(void)
-{
-#ifdef CONFIG_SIGNALFD
-    sigset_t mask;
-    int fd;
-    bool ok;
-    sigemptyset(&mask);
-    errno = 0;
-    fd = syscall(SYS_signalfd, -1, &mask, _NSIG / 8);
-    ok = (errno != ENOSYS);
-    if (fd >= 0) {
-        close(fd);
-    }
-    return ok;
-#else
-    return false;
-#endif
-}