]> git.ipfire.org Git - thirdparty/e2fsprogs.git/blobdiff - misc/dumpe2fs.c
Merge branch 'maint' into next
[thirdparty/e2fsprogs.git] / misc / dumpe2fs.c
index 72f323e0be672d72966b5ae46f6b7ac5f976366a..d295ba4d4ae751e215c429f369cd358d14e3121b 100644 (file)
@@ -387,7 +387,7 @@ static void print_inline_journal_information(ext2_filsys fs)
        }
        ext2fs_file_close(journal_file);
        jsb = (journal_superblock_t *) buf;
-       if (be32_to_cpu(jsb->s_header.h_magic) != JFS_MAGIC_NUMBER) {
+       if (be32_to_cpu(jsb->s_header.h_magic) != JBD2_MAGIC_NUMBER) {
                fprintf(stderr, "%s",
                        _("Journal superblock magic number invalid!\n"));
                exit(1);
@@ -410,9 +410,9 @@ static void print_journal_information(ext2_filsys fs)
                exit(1);
        }
        jsb = (journal_superblock_t *) buf;
-       if ((jsb->s_header.h_magic != (unsigned) ntohl(JFS_MAGIC_NUMBER)) ||
+       if ((jsb->s_header.h_magic != (unsigned) ntohl(JBD2_MAGIC_NUMBER)) ||
            (jsb->s_header.h_blocktype !=
-            (unsigned) ntohl(JFS_SUPERBLOCK_V2))) {
+            (unsigned) ntohl(JBD2_SUPERBLOCK_V2))) {
                com_err(program_name, 0, "%s",
                        _("Couldn't find journal superblock magic numbers"));
                exit(1);
@@ -670,6 +670,8 @@ int main (int argc, char ** argv)
                flags |= EXT2_FLAG_FORCE;
        if (image_dump)
                flags |= EXT2_FLAG_IMAGE_FILE;
+       if (header_only)
+               flags |= EXT2_FLAG_SUPER_ONLY;
 try_open_again:
        if (use_superblock && !use_blocksize) {
                for (use_blocksize = EXT2_MIN_BLOCK_SIZE;