]> granicus.if.org Git - strace/commitdiff
tests/btrfs.c: do not print errno in case of fs type mismatch
authorDmitry V. Levin <ldv@altlinux.org>
Tue, 24 May 2016 01:33:08 +0000 (01:33 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Tue, 24 May 2016 14:52:27 +0000 (14:52 +0000)
* tests/btrfs.c (main): Use error_msg_and_fail instead of
perror_msg_and_fail when the fs type of the given directory
is not BTRFS_SUPER_MAGIC.

tests/btrfs.c

index 54c57acf28cb921b9a9c27f14fc2968610387db4..f88bfb33f274c12dd82f6ad87a202e58b01f54e1 100644 (file)
@@ -1799,8 +1799,8 @@ main(int argc, char *argv[])
                        perror_msg_and_fail("statfs(%s) failed", path);
 
                if ((unsigned) sfi.f_type != BTRFS_SUPER_MAGIC)
-                       perror_msg_and_fail("%s is not a btrfs file system",
-                                           path);
+                       error_msg_and_fail("%s is not a btrfs file system",
+                                          path);
 
                btrfs_test_root = path;
                rootfd = open(path, O_RDONLY|O_DIRECTORY);