From 42be679df3b25510053cfac1e645173a80fd6b71 Mon Sep 17 00:00:00 2001 From: Milan Broz Date: Tue, 24 May 2011 11:39:39 +0000 Subject: [PATCH] Excluce some known dir from old scan. git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@532 36d66b0a-2a48-0410-832c-cd162a569da5 --- lib/utils_devpath.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/utils_devpath.c b/lib/utils_devpath.c index af6cec0..ded0c04 100644 --- a/lib/utils_devpath.c +++ b/lib/utils_devpath.c @@ -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; -- 2.7.4