diff options
author | Kay Sievers <kay@vrfy.org> | 2014-04-12 22:35:50 -0700 |
---|---|---|
committer | Kay Sievers <kay@vrfy.org> | 2014-04-13 17:12:14 -0700 |
commit | 9ea28c55a2488e6cd4a44ac5786f12b71ad5bc9f (patch) | |
tree | 3aeccb80e1b72169b8bc4836b5a6d1a76130ebe3 /src/libudev/libudev-monitor.c | |
parent | a163b64c4b08e8a4ad39a9a295acf3d1634024a3 (diff) |
udev: remove seqnum API and all assumptions about seqnums
The way the kernel namespaces have been implemented breaks assumptions
udev made regarding uevent sequence numbers. Creating devices in a
namespace "steals" uevents and its sequence numbers from the host. It
confuses the "udevadmin settle" logic, which might block until util a
timeout is reached, even when no uevent is pending.
Remove any assumptions about sequence numbers and deprecate libudev's
API exposing these numbers; none of that can reliably be used anymore
when namespaces are involved.
Diffstat (limited to 'src/libudev/libudev-monitor.c')
-rw-r--r-- | src/libudev/libudev-monitor.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/src/libudev/libudev-monitor.c b/src/libudev/libudev-monitor.c index ba1b04d479..3f7436b094 100644 --- a/src/libudev/libudev-monitor.c +++ b/src/libudev/libudev-monitor.c @@ -146,21 +146,6 @@ static bool udev_has_devtmpfs(struct udev *udev) { return false; } -/* we consider udev running when we have running udev service */ -static bool udev_has_service(struct udev *udev) { - struct udev_queue *queue; - bool active; - - queue = udev_queue_new(udev); - if (!queue) - return false; - - active = udev_queue_get_udev_is_active(queue); - udev_queue_unref(queue); - - return active; -} - struct udev_monitor *udev_monitor_new_from_netlink_fd(struct udev *udev, const char *name, int fd) { struct udev_monitor *udev_monitor; @@ -184,7 +169,7 @@ struct udev_monitor *udev_monitor_new_from_netlink_fd(struct udev *udev, const c * We do not set a netlink multicast group here, so the socket * will not receive any messages. */ - if (!udev_has_service(udev) && !udev_has_devtmpfs(udev)) { + if (access("/run/udev/control", F_OK) < 0 && !udev_has_devtmpfs(udev)) { udev_dbg(udev, "the udev service seems not to be active, disable the monitor\n"); group = UDEV_MONITOR_NONE; } else |