summaryrefslogtreecommitdiff
path: root/libudev
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2010-12-14 02:30:36 +0100
committerKay Sievers <kay.sievers@vrfy.org>2010-12-14 02:30:36 +0100
commit14996e80d4b002dbbef9721b936fe29155375fb1 (patch)
tree1f1eda11826c049416d5af3a17db41f09f3afc22 /libudev
parentcad40a5fe75d876af22f68b688494b9cd98cc899 (diff)
udevd: write full database file for (unsupported) renamed device nodes
Diffstat (limited to 'libudev')
-rw-r--r--libudev/libudev-device-private.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libudev/libudev-device-private.c b/libudev/libudev-device-private.c
index 430e3e64d4..406d8704f5 100644
--- a/libudev/libudev-device-private.c
+++ b/libudev/libudev-device-private.c
@@ -89,6 +89,9 @@ static bool device_has_info(struct udev_device *udev_device)
return true;
if (udev_device_get_tags_list_entry(udev_device) != NULL)
return true;
+ if (udev_device_get_knodename(udev_device) != NULL)
+ if (strcmp(udev_device_get_devnode(udev_device), udev_device_get_knodename(udev_device)) != 0)
+ return true;
if (udev_device_get_watch_handle(udev_device) >= 0)
return true;
return false;
@@ -102,7 +105,6 @@ int udev_device_update_db(struct udev_device *udev_device)
char filename[UTIL_PATH_SIZE];
char filename_tmp[UTIL_PATH_SIZE];
FILE *f;
- size_t devlen = strlen(udev_get_dev_path(udev))+1;
id = udev_device_get_id_filename(udev_device);
if (id == NULL)
@@ -127,6 +129,7 @@ int udev_device_update_db(struct udev_device *udev_device)
}
if (has_info) {
+ size_t devlen = strlen(udev_get_dev_path(udev))+1;
struct udev_list_entry *list_entry;
if (udev_device_get_devnode(udev_device) != NULL) {