chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cad40a5
)
udevd: write full database file for (unsupported) renamed device nodes
author
Kay Sievers
<kay.sievers@vrfy.org>
Tue, 14 Dec 2010 01:30:36 +0000
(
02:30
+0100)
committer
Kay Sievers
<kay.sievers@vrfy.org>
Tue, 14 Dec 2010 01:30:36 +0000
(
02:30
+0100)
libudev/libudev-device-private.c
patch
|
blob
|
history
test/sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1/uevent
patch
|
blob
|
history
test/sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/uevent
patch
|
blob
|
history
diff --git
a/libudev/libudev-device-private.c
b/libudev/libudev-device-private.c
index 430e3e64d4dbe74049515bad6e3c19324cccb3c8..406d8704f54e465f2d761cdce06e5f54d1a2b76f 100644
(file)
--- 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;
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;
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;
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)
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) {
}
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) {
struct udev_list_entry *list_entry;
if (udev_device_get_devnode(udev_device) != NULL) {
diff --git
a/test/sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1/uevent
b/test/sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1/uevent
index d3e19784f74edc25a021dd330d23037b5a3cbf21..c70ff22ad4db31cba5b9989988851684150e2791 100644
(file)
--- a/
test/sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1/uevent
+++ b/
test/sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1/uevent
@@
-1,3
+1,4
@@
MAJOR=8
MINOR=1
DEVTYPE=partition
MAJOR=8
MINOR=1
DEVTYPE=partition
+DEVNAME=sda1
diff --git
a/test/sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/uevent
b/test/sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/uevent
index c3945d4e0a4053ad79c9e38c930cba63fa671868..af0df2f298a000c10c9174da791d1bdf5e6f0519 100644
(file)
--- a/
test/sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/uevent
+++ b/
test/sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/uevent
@@
-1,3
+1,4
@@
MAJOR=8
MINOR=0
DEVTYPE=disk
MAJOR=8
MINOR=0
DEVTYPE=disk
+DEVNAME=sda