]> www.infradead.org Git - mtd-utils.git/commitdiff
fs-tests: integck: add some more error messages
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Thu, 26 May 2011 13:04:20 +0000 (16:04 +0300)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Fri, 27 May 2011 12:55:08 +0000 (15:55 +0300)
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
tests/fs-tests/integrity/integck.c

index e2a878f734bc9e03ad797671c4d56c469ab5c681..54e5ddc9c9d99f4b3e886b84f02681637c5824c4 100644 (file)
@@ -1562,7 +1562,10 @@ static void file_check(struct file_info *file, int fd)
                path = dir_path(file->links->parent, get_file_name(file));
                v("checking file %s", path);
                fd = open(path, O_RDONLY);
-               CHECK(fd != -1);
+               if (fd == -1) {
+                       sys_errmsg("cannot open file %s", path);
+                       CHECK(0);
+               }
        } else
                v("checking file %s", get_file_name(file));
 
@@ -1722,7 +1725,7 @@ static void dir_check(struct dir_info *dir)
                /* Go through directory on file system checking entries match */
                d = opendir(path);
                if (!d) {
-                       errmsg("cannot open directory %s", path);
+                       sys_errmsg("cannot open directory %s", path);
                        CHECK(0);
                }