diff options
author | Tom Gundersen <teg@jklm.no> | 2013-07-07 18:32:34 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2013-07-16 20:07:57 +0200 |
commit | 84b6ad702e64db534f67ce32d4dd2fec00a16784 (patch) | |
tree | 25e12d25a38a708f24354fae4fed2770a4362c81 /src/udev/udevadm-info.c | |
parent | 6cf2f1d94dc7749bcdff5385838bdc8eba9c3001 (diff) |
udev: export tags of "dead" device nodes to /run/udev/static_node-tags/
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/<tagname>/, if the device node exists.
These tags are cleaned up by udevadm info --cleanup-db, but are otherwise
never removed.
Diffstat (limited to 'src/udev/udevadm-info.c')
-rw-r--r-- | src/udev/udevadm-info.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/udev/udevadm-info.c b/src/udev/udevadm-info.c index 002876594f..2ee59fe075 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); |