summaryrefslogtreecommitdiff
path: root/debugfs
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2018-06-24 21:21:49 -0400
committerTheodore Ts'o <tytso@mit.edu>2018-06-24 21:21:49 -0400
commit5f63e5c4f9c45abafe6ea2ee31b1e85c97bf6ef2 (patch)
treebca13076fb41a579f306c88137ce5f3003b40262 /debugfs
parent51a3b0b3dcce2e35091292c33fcc88bd4ddf6bd8 (diff)
debugfs: suppress spurious "checksum errors" message for unrelated failures
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'debugfs')
-rw-r--r--debugfs/debugfs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/debugfs/debugfs.c b/debugfs/debugfs.c
index 2bf6a30c..ecca8108 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;