]> git.itanic.dy.fi Git - scan-pagemap/commitdiff
parser: opendir_check: Open the correct directory
authorTimo Kokkonen <kaapeli@itanic.dy.fi>
Fri, 23 Jul 2010 10:50:40 +0000 (13:50 +0300)
committerTimo Kokkonen <kaapeli@itanic.dy.fi>
Fri, 23 Jul 2010 10:50:40 +0000 (13:50 +0300)
Remove the incorrect hard coded directory since it is wrong.

Signed-off-by: Timo Kokkonen <kaapeli@itanic.dy.fi>
parse.c

diff --git a/parse.c b/parse.c
index 678dda339c9d4c0dc8db9004ca6836a3a8561331..30a84a34a47c95c84274af848330c0e841e0c237 100644 (file)
--- a/parse.c
+++ b/parse.c
@@ -362,11 +362,11 @@ static int opendir_check(DIR **dir, const char *path)
        int error;
 
        if (!*dir) {
-               *dir = opendir("/proc");
+               *dir = opendir(path);
                if (!dir) {
                        error = errno;
-                       fprintf(stderr, "Failed to open /proc directory: %s\n",
-                               strerror(error));
+                       fprintf(stderr, "Failed to open %s directory: %s\n",
+                               path, strerror(error));
                        return -1;
                }
        }