summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2007-03-19 11:57:54 +0100
committerKay Sievers <kay.sievers@vrfy.org>2007-03-19 11:57:54 +0100
commit604f104af43aa40ff07e43179909604a9a780800 (patch)
tree3ea674ed93e80b7904e9a043cca3865812c76f71
parenteb5b86405b14ca2ac2508f9dec9862cc57110131 (diff)
if a node goes away, possibly restore a waiting symlink
-rw-r--r--udev_node.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/udev_node.c b/udev_node.c
index 526d713516..f30ae876ec 100644
--- a/udev_node.c
+++ b/udev_node.c
@@ -44,7 +44,7 @@ int udev_node_mknod(struct udevice *udev, const char *file, dev_t devt, mode_t m
else
mode |= S_IFCHR;
- if (stat(file, &stats) != 0)
+ if (lstat(file, &stats) != 0)
goto create;
/* preserve node with already correct numbers, to prevent changing the inode number */
@@ -255,6 +255,9 @@ void udev_node_update_symlinks(struct udevice *udev, struct udevice *udev_old)
update_link(udev, link_old_loop->name);
}
}
+
+ /* the old node is gone, maybe we have a device with a symlink now */
+ update_link(udev, udev_old->name);
}
}