Excluce some known dir from old scan.

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@532 36d66b0a-2a48-0410-832c-cd162a569da5
This commit is contained in:
Milan Broz
2011-05-24 11:39:39 +00:00
parent b2569b6d5c
commit 42be679df3

View File

@@ -56,6 +56,13 @@ static char *__lookup_dev(char *path, dev_t dev, int dir_level, const int max_le
!strncmp(entry->d_name, "..", 2))
continue;
if (dir_level == 0 &&
(!strcmp(entry->d_name, "shm") ||
!strcmp(entry->d_name, "fd") ||
!strcmp(entry->d_name, "char") ||
!strcmp(entry->d_name, "pts")))
continue;
strncpy(ptr, entry->d_name, space);
if (stat(path, &st) < 0)
continue;