]> www.infradead.org Git - mtd-utils.git/commitdiff
fs-tests: integck: print name of directory which we cannot open
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Tue, 24 May 2011 13:31:30 +0000 (16:31 +0300)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Fri, 27 May 2011 12:55:06 +0000 (15:55 +0300)
In 'dir_check()' print name of the directory if we fail to open it.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
tests/fs-tests/integrity/integck.c

index b9f4666b346f898339315b47f84381797d5e6e6c..4ca93869fb16f0f305fe57a01c578f1f05feec97 100644 (file)
@@ -1701,7 +1701,10 @@ static void dir_check(struct dir_info *dir)
        /* Go through directory on file system checking entries match */
        path = dir_path(dir->parent, dir->entry->name);
        d = opendir(path);
-       CHECK(d != NULL);
+       if (!d) {
+               errmsg("cannot open directory %s", path);
+               CHECK(0);
+       }
        for (;;) {
                errno = 0;
                ent = readdir(d);