summaryrefslogtreecommitdiff
path: root/src/tmpfiles.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-02-19 14:20:16 +0100
committerLennart Poettering <lennart@poettering.net>2011-02-19 14:20:16 +0100
commit78ab08eb1ae12136f66c0dcf422cd511326bb233 (patch)
tree4b284fa36bb2f092059f8f6745d70e4963d93dec /src/tmpfiles.c
parentb5c6cf87342bedeb67fbbc4f3f512af1603a461c (diff)
tmpfiles: never clean up block devices
Diffstat (limited to 'src/tmpfiles.c')
-rw-r--r--src/tmpfiles.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/tmpfiles.c b/src/tmpfiles.c
index c5397ef846..917747a4a4 100644
--- a/src/tmpfiles.c
+++ b/src/tmpfiles.c
@@ -303,6 +303,10 @@ static int dir_cleanup(
if (S_ISSOCK(s.st_mode) && unix_socket_alive(sub_path))
continue;
+ /* Ignore device nodes */
+ if (S_ISCHR(s.st_mode) || S_ISBLK(s.st_mode))
+ continue;
+
age = MAX3(timespec_load(&s.st_mtim),
timespec_load(&s.st_atim),
timespec_load(&s.st_ctim));