diff options
author | Theodore Ts'o <tytso@mit.edu> | 2002-08-24 00:04:03 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2002-08-24 00:04:03 -0400 |
commit | f61fc0b5d98ef2455252d596e7b20131526d6762 (patch) | |
tree | 0613fb6167f6ce5334e0d8227e082ac344c04835 /lib/e2p/ls.c | |
parent | a3da9d1df7494cd60d9e91643ec2a243855b3bbb (diff) | |
download | e2fsprogs-f61fc0b5d98ef2455252d596e7b20131526d6762.tar.gz |
Add support for the hash_seed and s_def_hash_ver fields in the
superblock. Dumpe2fs can now print out these fields, and they
can be modified using debugfs's set_super_value command. Also added
to debugfs was the ability to set s_uuid and s_journal_uuid features
as well.
Diffstat (limited to 'lib/e2p/ls.c')
-rw-r--r-- | lib/e2p/ls.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/lib/e2p/ls.c b/lib/e2p/ls.c index e8ca09bc..02388fff 100644 --- a/lib/e2p/ls.c +++ b/lib/e2p/ls.c @@ -145,11 +145,7 @@ void list_super2(struct ext2_super_block * sb, FILE *f) } else strcpy(buf, "<not available>"); fprintf(f, "Last mounted on: %s\n", buf); - if (!e2p_is_null_uuid(sb->s_uuid)) { - e2p_uuid_to_str(sb->s_uuid, buf); - } else - strcpy(buf, "<none>"); - fprintf(f, "Filesystem UUID: %s\n", buf); + fprintf(f, "Filesystem UUID: %s\n", e2p_uuid2str(sb->s_uuid)); fprintf(f, "Filesystem magic number: 0x%04X\n", sb->s_magic); fprintf(f, "Filesystem revision #: %d", sb->s_rev_level); if (sb->s_rev_level == EXT2_GOOD_OLD_REV) { @@ -212,15 +208,18 @@ void list_super2(struct ext2_super_block * sb, FILE *f) fprintf(f, "Inode size: %d\n", sb->s_inode_size); } if (sb->s_feature_compat & EXT3_FEATURE_COMPAT_HAS_JOURNAL) { - if (e2p_is_null_uuid(sb->s_journal_uuid)) { - strcpy(buf, "<none>"); - } else - e2p_uuid_to_str(sb->s_journal_uuid, buf); - fprintf(f, "Journal UUID: %s\n", buf); + fprintf(f, "Journal UUID: %s\n", + e2p_uuid2str(sb->s_journal_uuid)); fprintf(f, "Journal inode: %u\n", sb->s_journal_inum); fprintf(f, "Journal device: 0x%04x\n", sb->s_journal_dev); fprintf(f, "First orphan inode: %u\n", sb->s_last_orphan); } + if (sb->s_feature_compat & EXT2_FEATURE_COMPAT_DIR_INDEX) { + fprintf(f, "Default directory hash: %s\n", + e2p_hash2string(sb->s_def_hash_version)); + fprintf(f, "Directory Hash Seed: %s\n", + e2p_uuid2str(sb->s_hash_seed)); + } } void list_super (struct ext2_super_block * s) |