From 7fcaabf8e80031b9919128c7cb8a86fdbcacb8f4 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Wed, 25 Dec 2013 22:53:00 -0500 Subject: [PATCH] dumpe2fs: don't try to print the journal info when using image files If dumpe2fs tries to print journal info when using an image file created using e2image, it will crash since the journal isn't available. So don't even try to print it. Signed-off-by: "Theodore Ts'o" --- misc/dumpe2fs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/misc/dumpe2fs.c b/misc/dumpe2fs.c index cb59f4129..d4bde8e51 100644 --- a/misc/dumpe2fs.c +++ b/misc/dumpe2fs.c @@ -337,6 +337,8 @@ static void print_inline_journal_information(ext2_filsys fs) __u32 *mask_ptr, mask, m; int i, j, size, printed = 0; + if (fs->flags & EXT2_FLAG_IMAGE_FILE) + return; retval = ext2fs_read_inode(fs, ino, &inode); if (retval) { com_err(program_name, retval, "%s", -- 2.47.2