All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] udev-watch: try inotify_init if inotify_init1 is not available
@ 2011-02-25 15:55 Steffen Sledz
  2011-02-25 16:57 ` Kay Sievers
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Steffen Sledz @ 2011-02-25 15:55 UTC (permalink / raw)
  To: linux-hotplug

inotify_init1 first appeared in Linux 2.6.27

Signed-off-by: Steffen Sledz <sledz@dresearch.de>
---
 udev/udev-watch.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/udev/udev-watch.c b/udev/udev-watch.c
index f51a10d..ac679ec 100644
--- a/udev/udev-watch.c
+++ b/udev/udev-watch.c
@@ -39,6 +39,8 @@ static int inotify_fd = -1;
 int udev_watch_init(struct udev *udev)
 {
 	inotify_fd = inotify_init1(IN_CLOEXEC);
+	if (inotify_fd = -1 && errno = ENOSYS)
+		inotify_fd = inotify_init();
 	if (inotify_fd < 0)
 		err(udev, "inotify_init failed: %m\n");
 	return inotify_fd;
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-02-25 17:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-25 15:55 [PATCH] udev-watch: try inotify_init if inotify_init1 is not available Steffen Sledz
2011-02-25 16:57 ` Kay Sievers
2011-02-25 17:01 ` [PATCH] udev-watch: try inotify_init if inotify_init1 is not Steffen Sledz
2011-02-25 17:46 ` [PATCH] udev-watch: try inotify_init if inotify_init1 is not available Kay Sievers

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.