[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 1/2] qemu_signalfd_available(): remove function due
From: |
Laszlo Ersek |
Subject: |
[Qemu-devel] [PATCH 1/2] qemu_signalfd_available(): remove function due to lack of callers |
Date: |
Wed, 21 Jan 2015 13:57:16 +0100 |
Noone calls qemu_signalfd_available(), let's remove it.
Signed-off-by: Laszlo Ersek <address@hidden>
---
include/qemu/compatfd.h | 1 -
util/compatfd.c | 19 -------------------
2 files changed, 20 deletions(-)
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
-}
--
1.8.3.1