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

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