From 6284c1ca41dca85e968e8d304cdc154c5a46d6d2 Mon Sep 17 00:00:00 2001 From: "Anthony G. Basile" Date: Tue, 30 Jul 2013 14:05:40 -0400 Subject: udev: export tags of "dead" device nodes to /run/udev/static_node-tags/ This is upstream 84b6ad702e64db534f67ce32d4dd2fec00a16784 Based on a patch by Kay Sievers. A tag is exported at boot as a symlinks to the device node in the folder /run/udev/static_node-tags//, if the device node exists. These tags are cleaned up by udevadm info --cleanup-db, but are otherwise never removed. Signed-off-by: Anthony G. Basile --- src/udev/udevadm-info.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/udev/udevadm-info.c') diff --git a/src/udev/udevadm-info.c b/src/udev/udevadm-info.c index 0eaaea19ae..a5872efbc3 100644 --- a/src/udev/udevadm-info.c +++ b/src/udev/udevadm-info.c @@ -251,6 +251,12 @@ static void cleanup_db(struct udev *udev) closedir(dir); } + dir = opendir("/run/udev/static_node-tags"); + if (dir != NULL) { + cleanup_dir(dir, 0, 2); + closedir(dir); + } + dir = opendir("/run/udev/watch"); if (dir != NULL) { cleanup_dir(dir, 0, 1); -- cgit v1.2.3-54-g00ecf