diff options
author | Theodore Ts'o <tytso@mit.edu> | 2002-10-15 17:43:43 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2002-10-15 17:43:43 -0400 |
commit | a0c3fd5e4cdc2e0b032c9ace89d960a622069c32 (patch) | |
tree | 6a0b62c8dfe194fcfeda904be2e33221e5b45174 /lib/e2p/ls.c | |
parent | 3e69906495d5898849a6154b0311b5d4a84a27ae (diff) | |
download | e2fsprogs-a0c3fd5e4cdc2e0b032c9ace89d960a622069c32.tar.gz |
Add support for new feature in ext2/3 filesystems; a default mount options field
in the superblock. Added the tune2fs '-o' option to set this field.
Diffstat (limited to 'lib/e2p/ls.c')
-rw-r--r-- | lib/e2p/ls.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/e2p/ls.c b/lib/e2p/ls.c index 02388fff..c18e0fff 100644 --- a/lib/e2p/ls.c +++ b/lib/e2p/ls.c @@ -112,6 +112,24 @@ static void print_features(struct ext2_super_block * s, FILE *f) #endif } +static void print_mntopts(struct ext2_super_block * s, FILE *f) +{ +#ifdef EXT2_DYNAMIC_REV + int i, printed=0; + __u32 mask = s->s_default_mount_opts, m; + + fprintf(f, "Default mount options: "); + for (i=0,m=1; i < 32; i++, m<<=1) { + if (mask & m) { + fprintf(f, " %s", e2p_mntopt2string(i, m)); + printed++; + } + } + if (printed == 0) + fprintf(f, " (none)"); + fprintf(f, "\n"); +#endif +} #ifndef EXT2_INODE_SIZE @@ -157,6 +175,7 @@ void list_super2(struct ext2_super_block * sb, FILE *f) } else fprintf(f, " (unknown)\n"); print_features(sb, f); + print_mntopts(sb, f); fprintf(f, "Filesystem state: "); print_fs_state (f, sb->s_state); fprintf(f, "\n"); |