summaryrefslogtreecommitdiff
path: root/super1.c
diff options
context:
space:
mode:
authorGuoqing Jiang <gqjiang@suse.com>2015-07-06 16:52:11 +0800
committerNeilBrown <neilb@suse.com>2015-07-29 17:26:12 +1000
commit2cf42394f020af6643451afb6ca41c3f831c14ef (patch)
tree00ccaa41663bf126ced8773a054208f0c4e400cd /super1.c
parentd7a493695a462ed938d76c181f6f76fb4140597c (diff)
downloadmdadm-2cf42394f020af6643451afb6ca41c3f831c14ef.tar.gz
md-cluster: use %-64s to print cluster_name
Left align is better for cluster with name less than 64. Also make the output of cluster name is aligned with others. Signed-off-by: Guoqing Jiang <gqjiang@suse.com> Signed-off-by: NeilBrown <neilb@suse.com>
Diffstat (limited to 'super1.c')
-rw-r--r--super1.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/super1.c b/super1.c
index fda71e3..9b991e6 100644
--- a/super1.c
+++ b/super1.c
@@ -305,7 +305,7 @@ static void examine_super1(struct supertype *st, char *homehost)
printf(" (local to host %s)", homehost);
printf("\n");
if (bms->nodes > 0)
- printf("Cluster Name : %s", bms->cluster_name);
+ printf(" Cluster Name : %-64s\n", bms->cluster_name);
atime = __le64_to_cpu(sb->ctime) & 0xFFFFFFFFFFULL;
printf(" Creation Time : %.24s\n", ctime(&atime));
c=map_num(pers, __le32_to_cpu(sb->level));
@@ -763,7 +763,7 @@ static void detail_super1(struct supertype *st, char *homehost)
strncmp(sb->set_name, homehost, l) == 0)
printf(" (local to host %s)", homehost);
if (bms->nodes > 0)
- printf("Cluster Name : %64s", bms->cluster_name);
+ printf("\n Cluster Name : %-64s", bms->cluster_name);
printf("\n UUID : ");
for (i=0; i<16; i++) {
if ((i&3)==0 && i != 0) printf(":");