]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_repair: don't use do_warn for normal log message
authorMasatake YAMATO <yamato@redhat.com>
Fri, 15 Sep 2017 18:42:18 +0000 (13:42 -0500)
committerEric Sandeen <sandeen@redhat.com>
Fri, 15 Sep 2017 18:42:18 +0000 (13:42 -0500)
In some case, exit status of xfs_repair -n is different even for
the same file system when -v is specified or not. This patch fixes
this behavior.

If -v is specified, do_warn() is used in zero_log() for printing
a normal message. That makes the exit status to 1 though there
is no dirtiness in the file system.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
[sandeen: edit changelog for brevity]
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
repair/phase2.c

index 0085732b39db70d0c2643a0f2e842e8006d1d6a8..992e997b039af30f50f49fd80d6f771a02dbd7cd 100644 (file)
@@ -86,7 +86,7 @@ zero_log(
                        exit(2);
        } else {
                if (verbose) {
-                       do_warn(
+                       do_log(
        _("zero_log: head block %" PRId64 " tail block %" PRId64 "\n"),
                                head_blk, tail_blk);
                }