Whamcloud - gitweb
dumpe2fs: don't try to print the journal info when using image files
authorTheodore Ts'o <tytso@mit.edu>
Thu, 26 Dec 2013 03:53:00 +0000 (22:53 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 26 Dec 2013 05:21:13 +0000 (00:21 -0500)
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" <tytso@mit.edu>
misc/dumpe2fs.c

index cb59f41..d4bde8e 100644 (file)
@@ -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",