chiark / gitweb /
tmpfiles: never clean up block devices
authorLennart Poettering <lennart@poettering.net>
Sat, 19 Feb 2011 13:20:16 +0000 (14:20 +0100)
committerLennart Poettering <lennart@poettering.net>
Sat, 19 Feb 2011 13:20:16 +0000 (14:20 +0100)
src/tmpfiles.c

index c5397ef846ca2cdcabbc945ee7efd0c2f37910e9..917747a4a48548237549ac743c710e0a11172ac7 100644 (file)
@@ -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));