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

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