]> err.no Git - util-linux/commitdiff
libblkid: don't scan private /dev/.udev directory
authorKarel Zak <kzak@redhat.com>
Fri, 25 Sep 2009 13:33:07 +0000 (15:33 +0200)
committerKarel Zak <kzak@redhat.com>
Fri, 25 Sep 2009 13:33:07 +0000 (15:33 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
shlibs/blkid/src/devno.c

index 11f212ef5bc713b33dcdea3c836801936302593e..f48f26ecb83a749769fe808eebf42d1acd9583ac 100644 (file)
@@ -189,6 +189,11 @@ void blkid__scan_dir(char *dirname, dev_t devno, struct dir_list **list,
                            !S_ISDIR(st.st_mode))
                                continue;       /* symlink or lstat() failed */
                }
+
+               if (strcmp(".udev", dp->d_name) == 0)
+                       /* udev private direcory is huge and uninteresting */
+                       continue;
+
                add_to_dirlist(dirname, dp->d_name, list);
        }
        closedir(dir);