summaryrefslogtreecommitdiff
path: root/misc/dumpe2fs.c
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2014-09-08 16:12:28 -0700
committerTheodore Ts'o <tytso@mit.edu>2014-09-11 12:40:55 -0400
commit3727a0e745e426802f8e829ab2d47523f7c6de81 (patch)
tree77f1fa5081a213fc2b10b4b54c5dd44218f7b0e1 /misc/dumpe2fs.c
parent811bccef89a074e1c1582439a79b4b34e9d47e2c (diff)
downloade2fsprogs-3727a0e745e426802f8e829ab2d47523f7c6de81.tar.gz
dumpe2fs: display external journal feature flags
Display the feature flags of an external journal. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reported-by: TR Reardon <thomas_reardon@hotmail.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'misc/dumpe2fs.c')
-rw-r--r--misc/dumpe2fs.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/misc/dumpe2fs.c b/misc/dumpe2fs.c
index 25dce9c5..4c7bf46f 100644
--- a/misc/dumpe2fs.c
+++ b/misc/dumpe2fs.c
@@ -433,8 +433,9 @@ static void print_journal_information(ext2_filsys fs)
errcode_t retval;
char buf[1024];
char str[80];
- unsigned int i;
+ unsigned int i, j, printed = 0;
journal_superblock_t *jsb;
+ __u32 *mask_ptr, mask, m;
/* Get the journal superblock */
if ((retval = io_channel_read_blk64(fs->io,
@@ -465,6 +466,17 @@ static void print_journal_information(ext2_filsys fs)
journal_checksum_type_str(jsb->s_checksum_type),
ext2fs_be32_to_cpu(jsb->s_checksum));
+ printf("%s", _("Journal features: "));
+ for (i = 0, mask_ptr = &jsb->s_feature_compat; i < 3; i++, mask_ptr++) {
+ mask = be32_to_cpu(*mask_ptr);
+ for (j = 0, m = 1; j < 32; j++, m <<= 1) {
+ if (mask & m) {
+ printf(" %s", e2p_jrnl_feature2string(i, m));
+ printed++;
+ }
+ }
+ }
+
printf(_("\nJournal block size: %u\n"
"Journal length: %u\n"
"Journal first block: %u\n"