chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
udevadm: add info option --device-id-of-file=<file>
[elogind.git]
/
udev_node.c
diff --git
a/udev_node.c
b/udev_node.c
index 556a442a333709a08593a4f4c2ded038942a8e5c..c620e4aa0b13f95b676cb95401e9216235aff291 100644
(file)
--- a/
udev_node.c
+++ b/
udev_node.c
@@
-218,14
+218,16
@@
static int update_link(struct udevice *udev, const char *name)
if (strcmp(udev->dev->devpath, device->name) == 0) {
info("compare (our own) priority of '%s' %i >= %i",
udev->dev->devpath, udev->link_priority, priority);
if (strcmp(udev->dev->devpath, device->name) == 0) {
info("compare (our own) priority of '%s' %i >= %i",
udev->dev->devpath, udev->link_priority, priority);
- if (target[0] == '\0' || udev->link_priority >= priority) {
+ if (strcmp(udev->name, name) == 0) {
+ info("'%s' is our device node, database inconsistent, skip link update", udev->name);
+ } else if (target[0] == '\0' || udev->link_priority >= priority) {
priority = udev->link_priority;
strlcpy(target, udev->name, sizeof(target));
}
continue;
}
priority = udev->link_priority;
strlcpy(target, udev->name, sizeof(target));
}
continue;
}
- /*
or something else, then
read priority from database */
+ /*
another device,
read priority from database */
udev_db = udev_device_init(NULL);
if (udev_db == NULL)
continue;
udev_db = udev_device_init(NULL);
if (udev_db == NULL)
continue;