chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
udevd: use dev_t or netif ifindex as database key
[elogind.git]
/
udev
/
udev-watch.c
diff --git
a/udev/udev-watch.c
b/udev/udev-watch.c
index 5fa60101c46ad63cb99e444d4b103c6f5d33217c..9e1b8d8553e3650f39519df602153072281a04ce 100644
(file)
--- a/
udev/udev-watch.c
+++ b/
udev/udev-watch.c
@@
-109,7
+109,6
@@
unlink:
void udev_watch_begin(struct udev *udev, struct udev_device *dev)
{
char filename[UTIL_PATH_SIZE];
void udev_watch_begin(struct udev *udev, struct udev_device *dev)
{
char filename[UTIL_PATH_SIZE];
- char majmin[UTIL_PATH_SIZE];
int wd;
if (inotify_fd < 0)
int wd;
if (inotify_fd < 0)
@@
-123,13
+122,10
@@
void udev_watch_begin(struct udev *udev, struct udev_device *dev)
return;
}
return;
}
- snprintf(majmin, sizeof(majmin), "%c%i:%i",
- strcmp(udev_device_get_subsystem(dev), "block") == 0 ? 'b' : 'c',
- major(udev_device_get_devnum(dev)), minor(udev_device_get_devnum(dev)));
snprintf(filename, sizeof(filename), "%s/.udev/watch/%d", udev_get_dev_path(udev), wd);
util_create_path(udev, filename);
unlink(filename);
snprintf(filename, sizeof(filename), "%s/.udev/watch/%d", udev_get_dev_path(udev), wd);
util_create_path(udev, filename);
unlink(filename);
- symlink(
majmin
, filename);
+ symlink(
udev_device_get_id_filename(dev)
, filename);
udev_device_set_watch_handle(dev, wd);
}
udev_device_set_watch_handle(dev, wd);
}