X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fmdadm.git;a=blobdiff_plain;f=super-ddf.c;h=ad21e74a3c82fee0ded5074d1b737ac921b330db;hp=77ce46fd37de83faff1f329ad45dfd1d58f438e3;hb=ff54de6e47163944185f231700e72d3122b58f4c;hpb=d7288ddc3a06a0912f5f0a3f23ccca76a66ff332 diff --git a/super-ddf.c b/super-ddf.c index 77ce46fd..ad21e74a 100644 --- a/super-ddf.c +++ b/super-ddf.c @@ -1100,20 +1100,18 @@ static void examine_super_ddf(struct supertype *st, char *homehost) examine_pds(sb); } +static void getinfo_super_ddf(struct supertype *st, struct mdinfo *info); + + static void brief_examine_super_ddf(struct supertype *st) { /* We just write a generic DDF ARRAY entry - * The uuid is all hex, 6 groups of 4 bytes */ - struct ddf_super *ddf = st->sb; - int i; - printf("ARRAY /dev/ddf metadata=ddf UUID="); - for (i = 0; i < DDF_GUID_LEN; i++) { - if ((i&3) == 0 && i != 0) - printf(":"); - printf("%02X", 255&ddf->anchor.guid[i]); - } - printf("\n"); + struct mdinfo info; + char nbuf[64]; + getinfo_super_ddf(st, &info); + fname_from_uuid(st, &info, nbuf, ':'); + printf("ARRAY /dev/ddf metadata=ddf UUID=%s\n", nbuf + 5); } static void detail_super_ddf(struct supertype *st, char *homehost) @@ -1132,6 +1130,11 @@ static void brief_detail_super_ddf(struct supertype *st) * Can that be stored in ddf_super?? */ // struct ddf_super *ddf = st->sb; + struct mdinfo info; + char nbuf[64]; + getinfo_super_ddf(st, &info); + fname_from_uuid(st, &info, nbuf,':'); + printf(" UUID=%s", nbuf + 5); } #endif