Skip to contentSkip to conversation

fsck.overlay: fix report bug

PATCH New yangerkun 1 participant 1 message Feb 23, 2018

lore
Share & tools
lore

yangerkun

author
#0 lore raw

PATCH 1/1 fsck.overlay: fix report bug

Now, the ovl_scan_check will not show all the infomation about the invalid xattr.

---
 check.c | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)
check.c +13 -6
index 10d345f..e109620 100644
@@ -904,19 +904,26 @@ static void ovl_scan_report(struct scan_ctx *sctx)
 /* Report the invalid targets left */
 static void ovl_scan_check(struct scan_ctx *sctx)
 {
-	if (sctx->i_whiteouts)
+	bool incons = false;
+
+	if (sctx->i_whiteouts) {
 		print_info(_("Invalid whiteouts %d left!\n"),
 			     sctx->i_whiteouts);
-	else if (sctx->i_redirects)
+		incons = true;
+	}
+	if (sctx->i_redirects) {
 		print_info(_("Invalid redirect directories %d left!\n"),
 			     sctx->i_redirects);
-	else if (sctx->m_impure)
+		incons = true;
+	}
+	if (sctx->m_impure) {
 		print_info(_("Directories %d missing impure xattr!\n"),
 			     sctx->m_impure);
-	else
-		return;
+		incons = true;
+	}
 
-	set_inconsistency(&status);
+	if (incons)
+		set_inconsistency(&status);
 }
 
 /* Scan upperdir and each lowerdirs, check and fix inconsistency */
Signature · 1 line
2.13.6