Patchwork [1/4] dumpe2fs: print journal's s_errno field if it is non-zero

login
register
mail settings
Submitter Theodore Ts'o
Date June 1, 2012, 12:14 a.m.
Message ID <1338509698-24349-1-git-send-email-tytso@mit.edu>
Download mbox | patch
Permalink /patch/162247/
State Accepted
Headers show

Comments

Theodore Ts'o - June 1, 2012, 12:14 a.m.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
---
 misc/dumpe2fs.c | 3 +++
 1 file changed, 3 insertions(+)

Patch

diff --git a/misc/dumpe2fs.c b/misc/dumpe2fs.c
index 8f4f2e4..8be5764 100644
--- a/misc/dumpe2fs.c
+++ b/misc/dumpe2fs.c
@@ -382,6 +382,9 @@  static void print_inline_journal_information(ext2_filsys fs)
 	       (unsigned int)ntohl(jsb->s_maxlen),
 	       (unsigned int)ntohl(jsb->s_sequence),
 	       (unsigned int)ntohl(jsb->s_start));
+	if (jsb->s_errno != 0)
+		printf(_("Journal errno:            %d\n"),
+		       (int) ntohl(jsb->s_errno));
 }
 
 static void print_journal_information(ext2_filsys fs)