Blame SOURCES/xfsprogs-4.13.0-xfs_repair-don-t-use-do_warn-for-normal-log-message.patch

e59f31
From 67ea25fe9d663f69b550b39ce86b074534ae7c85 Mon Sep 17 00:00:00 2001
e59f31
From: Masatake YAMATO <yamato@redhat.com>
e59f31
Date: Fri, 15 Sep 2017 13:42:18 -0500
e59f31
Subject: [PATCH] xfs_repair: don't use do_warn for normal log message
e59f31
e59f31
In some case, exit status of xfs_repair -n is different even for
e59f31
the same file system when -v is specified or not. This patch fixes
e59f31
this behavior.
e59f31
e59f31
If -v is specified, do_warn() is used in zero_log() for printing
e59f31
a normal message. That makes the exit status to 1 though there
e59f31
is no dirtiness in the file system.
e59f31
e59f31
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
e59f31
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
e59f31
[sandeen: edit changelog for brevity]
e59f31
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
e59f31
---
e59f31
 repair/phase2.c | 2 +-
e59f31
 1 file changed, 1 insertion(+), 1 deletion(-)
e59f31
e59f31
Index: xfsprogs-4.5.0/repair/phase2.c
e59f31
===================================================================
e59f31
--- xfsprogs-4.5.0.orig/repair/phase2.c
e59f31
+++ xfsprogs-4.5.0/repair/phase2.c
e59f31
@@ -85,7 +85,7 @@ zero_log(
e59f31
 "attempt a repair.\n"));
e59f31
 	} else {
e59f31
 		if (verbose) {
e59f31
-			do_warn(
e59f31
+			do_log(
e59f31
 	_("zero_log: head block %" PRId64 " tail block %" PRId64 "\n"),
e59f31
 				head_blk, tail_blk);
e59f31
 		}