diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2009-02-24 15:11:17 +0100 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2009-02-24 15:11:17 +0100 |
commit | 3d3a0a709a38805259fe07240c3ca47a120dd5d6 (patch) | |
tree | 3f31488e3123c532cce1dd212be265854c1c1744 /udev/udev-watch.c | |
parent | d5d04d4f9f75b5c5318bf2aa3bc10719d9a2e3bc (diff) |
use the event udev_device to disable the watch on "remove"
Diffstat (limited to 'udev/udev-watch.c')
-rw-r--r-- | udev/udev-watch.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/udev/udev-watch.c b/udev/udev-watch.c index a581f02cb5..dff3de1cb4 100644 --- a/udev/udev-watch.c +++ b/udev/udev-watch.c @@ -129,7 +129,7 @@ void udev_watch_begin(struct udev *udev, struct udev_device *dev) char filename[UTIL_PATH_SIZE]; int wd; - if (inotify_fd < 0 || major(udev_device_get_devnum(dev)) == 0) + if (inotify_fd < 0) return; info(udev, "adding watch on '%s'\n", udev_device_get_devnode(dev)); @@ -145,7 +145,6 @@ void udev_watch_begin(struct udev *udev, struct udev_device *dev) symlink(udev_device_get_syspath(dev), filename); udev_device_set_watch_handle(dev, wd); - udev_device_update_db(dev); } void udev_watch_end(struct udev *udev, struct udev_device *dev) @@ -153,7 +152,7 @@ void udev_watch_end(struct udev *udev, struct udev_device *dev) int wd; char filename[UTIL_PATH_SIZE]; - if (inotify_fd < 0 || major(udev_device_get_devnum(dev)) == 0) + if (inotify_fd < 0) return; wd = udev_device_get_watch_handle(dev); @@ -167,7 +166,6 @@ void udev_watch_end(struct udev *udev, struct udev_device *dev) unlink(filename); udev_device_set_watch_handle(dev, -1); - udev_device_update_db(dev); } struct udev_device *udev_watch_lookup(struct udev *udev, int wd) |