diff options
author | Theodore Ts'o <tytso@mit.edu> | 2014-04-26 19:00:50 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2014-05-04 23:15:29 -0400 |
commit | 6d82e1f4c7af427975009063d387f66cf9672962 (patch) | |
tree | dc24a095b015aa15e20934e43c713ddb361da7f1 /misc | |
parent | dbcd617882ee5c9da80d9257475f2594352f6698 (diff) | |
download | e2fsprogs-6d82e1f4c7af427975009063d387f66cf9672962.tar.gz |
mke2fs: only print the low-level file system stats in verbose mode
Also print the file system UUID if it is non-NULL.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'misc')
-rw-r--r-- | misc/mke2fs.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/misc/mke2fs.c b/misc/mke2fs.c index 97b601f9..2c51999f 100644 --- a/misc/mke2fs.c +++ b/misc/mke2fs.c @@ -618,6 +618,14 @@ static void show_stats(ext2_filsys fs) dgrp_t i; int need, col_left; + if (!verbose) { + printf(_("Creating filesystem with %llu %dk blocks and " + "%u inodes\n"), + ext2fs_blocks_count(s), fs->blocksize >> 10, + s->s_inodes_count); + goto skip_details; + } + if (ext2fs_blocks_count(&fs_param) != ext2fs_blocks_count(s)) fprintf(stderr, _("warning: %llu blocks unused.\n\n"), ext2fs_blocks_count(&fs_param) - ext2fs_blocks_count(s)); @@ -666,11 +674,14 @@ static void show_stats(ext2_filsys fs) s->s_blocks_per_group, s->s_clusters_per_group); printf(_("%u inodes per group\n"), s->s_inodes_per_group); +skip_details: if (fs->group_desc_count == 1) { printf("\n"); return; } + if (!e2p_is_null_uuid(s->s_uuid)) + printf(_("Filesystem UUID: %s\n"), e2p_uuid2str(s->s_uuid)); printf("%s", _("Superblock backups stored on blocks: ")); group_block = s->s_first_data_block; col_left = 0; |