summaryrefslogblamecommitdiff
path: root/system/e2fsprogs/debugfs-spurious-message.patch
blob: 6ecb226da57fb8915f7d09367359fdd5c639a123 (plain) (tree)



























                                                                                                 
From 5f63e5c4f9c45abafe6ea2ee31b1e85c97bf6ef2 Mon Sep 17 00:00:00 2001
From: Theodore Ts'o <tytso@mit.edu>
Date: Sun, 24 Jun 2018 21:21:49 -0400
Subject: debugfs: suppress spurious "checksum errors" message for unrelated
 failures

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
 debugfs/debugfs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/debugfs/debugfs.c b/debugfs/debugfs.c
index 2bf6a30..ecca810 100644
--- a/debugfs/debugfs.c
+++ b/debugfs/debugfs.c
@@ -172,7 +172,8 @@ static void open_filesystem(char *device, int open_flags, blk64_t superblock,
 try_open_again:
 	retval = ext2fs_open(device, open_flags, superblock, blocksize,
 			     io_ptr, &current_fs);
-	if (retval && !(open_flags & EXT2_FLAG_IGNORE_CSUM_ERRORS)) {
+	if (retval && (retval == EXT2_ET_SB_CSUM_INVALID) &&
+	    !(open_flags & EXT2_FLAG_IGNORE_CSUM_ERRORS)) {
 		open_flags |= EXT2_FLAG_IGNORE_CSUM_ERRORS;
 		printf("Checksum errors in superblock!  Retrying...\n");
 		goto try_open_again;
-- 
cgit v1.1