[Ocfs2-tools-devel] [PATCH 1/1] mkfs.ocfs2: Print fs features during make
Joel Becker
Joel.Becker at oracle.com
Fri Feb 19 13:52:48 PST 2010
On Fri, Feb 19, 2010 at 01:46:54PM -0800, Sunil Mushran wrote:
> Patch makes mkfs.ocfs2 print the filesystem features being enabled.
>
> Signed-off-by: Sunil Mushran <sunil.mushran at oracle.com>
sobby
> ---
> mkfs.ocfs2/mkfs.c | 18 +++++++++++-------
> 1 files changed, 11 insertions(+), 7 deletions(-)
>
> diff --git a/mkfs.ocfs2/mkfs.c b/mkfs.ocfs2/mkfs.c
> index 85e5463..3d4698b 100644
> --- a/mkfs.ocfs2/mkfs.c
> +++ b/mkfs.ocfs2/mkfs.c
> @@ -2597,10 +2597,13 @@ static void
> print_state(State *s)
> {
> int i;
> + char buf[PATH_MAX] = "\0";
>
> if (s->quiet)
> return;
>
> + ocfs2_snprint_feature_flags(buf, PATH_MAX, &s->feature_flags);
> +
> if (s->fs_type != OCFS2_MKFSTYPE_DEFAULT) {
> for(i = 0; ocfs2_mkfs_types_table[i].ft_str; i++) {
> if (ocfs2_mkfs_types_table[i].ft_type == s->fs_type) {
> @@ -2610,21 +2613,22 @@ print_state(State *s)
> }
> }
> }
> - printf("Filesystem label=%s\n", s->vol_label);
> - printf("Block size=%u (bits=%u)\n", s->blocksize, s->blocksize_bits);
> - printf("Cluster size=%u (bits=%u)\n", s->cluster_size, s->cluster_size_bits);
> - printf("Volume size=%"PRIu64" (%u clusters) (%"PRIu64" blocks)\n",
> + printf("Label: %s\n", s->vol_label);
> + printf("Features: %s\n", buf);
> + printf("Block size: %u (%u bits)\n", s->blocksize, s->blocksize_bits);
> + printf("Cluster size: %u (%u bits)\n", s->cluster_size, s->cluster_size_bits);
> + printf("Volume size: %"PRIu64" (%u clusters) (%"PRIu64" blocks)\n",
> s->volume_size_in_bytes, s->volume_size_in_clusters,
> s->volume_size_in_blocks);
> - printf("%u cluster groups (tail covers %u clusters, rest cover %u "
> + printf("Cluster groups: %u (tail covers %u clusters, rest cover %u "
> "clusters)\n", s->nr_cluster_groups, s->tail_group_bits,
> s->global_cpg);
> if (s->hb_dev)
> printf("Heartbeat device\n");
> else
> - printf("Journal size=%"PRIu64"\n",
> + printf("Journal size: %"PRIu64"\n",
> s->journal_size_in_bytes);
> - printf("Initial number of node slots: %u\n", s->initial_slots);
> + printf("Node slots: %u\n", s->initial_slots);
> }
>
> static void
> --
> 1.6.3.3
>
--
"One of the symptoms of an approaching nervous breakdown is the
belief that one's work is terribly important."
- Bertrand Russell
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127
More information about the Ocfs2-tools-devel
mailing list