summaryrefslogtreecommitdiff
path: root/udev_node.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2007-09-12 00:21:53 +0200
committerKay Sievers <kay.sievers@vrfy.org>2007-09-12 00:21:53 +0200
commit25c208d659cf0f8bc887a1f7c62e9d2e0c546aec (patch)
treec443ca4c2d0e9c34d87074ad5eb44adfc101da8a /udev_node.c
parent554074c9ca2f1b8876176887e4656d06b870f2cd (diff)
ignore device node names while restoring symlinks from the stack
Diffstat (limited to 'udev_node.c')
-rw-r--r--udev_node.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/udev_node.c b/udev_node.c
index 25eed86935..556a442a33 100644
--- a/udev_node.c
+++ b/udev_node.c
@@ -230,11 +230,15 @@ static int update_link(struct udevice *udev, const char *name)
if (udev_db == NULL)
continue;
if (udev_db_get_device(udev_db, device->name) == 0) {
- info("compare priority of '%s' %i > %i",
- udev_db->dev->devpath, udev_db->link_priority, priority);
- if (target[0] == '\0' || udev_db->link_priority > priority) {
- priority = udev_db->link_priority;
- strlcpy(target, udev_db->name, sizeof(target));
+ if (strcmp(udev_db->name, name) == 0) {
+ info("'%s' is a device node of '%s', skip link update", udev_db->name, device->name);
+ } else {
+ info("compare priority of '%s' %i > %i",
+ udev_db->dev->devpath, udev_db->link_priority, priority);
+ if (target[0] == '\0' || udev_db->link_priority > priority) {
+ priority = udev_db->link_priority;
+ strlcpy(target, udev_db->name, sizeof(target));
+ }
}
}
udev_device_cleanup(udev_db);
@@ -242,8 +246,8 @@ static int update_link(struct udevice *udev, const char *name)
name_list_cleanup(&name_list);
if (target[0] == '\0') {
- err("missing target for '%s'", name);
- rc = -1;
+ info("no current target for '%s' found", name);
+ rc = 1;
goto out;
}