From ff54de6e47163944185f231700e72d3122b58f4c Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Thu, 18 Sep 2008 16:11:40 +1000 Subject: Report uuid in --detail --brief for ddf and intel The uuid is slightly fictitious but needed for array matching. --- util.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'util.c') diff --git a/util.c b/util.c index b65d2ad8..653796f1 100644 --- a/util.c +++ b/util.c @@ -269,7 +269,7 @@ void copy_uuid(void *a, int b[4], int swapuuid) memcpy(a, b, 16); } -char *fname_from_uuid(struct supertype *st, struct mdinfo *info, char *buf) +char *fname_from_uuid(struct supertype *st, struct mdinfo *info, char *buf, char sep) { int i; char uuid[16]; @@ -278,10 +278,8 @@ char *fname_from_uuid(struct supertype *st, struct mdinfo *info, char *buf) c += strlen(c); copy_uuid(uuid, info->uuid, st->ss->swapuuid); for (i=0; i<16; i++) { - if (i && (i&3)==0) { - strcpy(c, "-"); - c++; - } + if (i && (i&3)==0) + *c++ = sep; sprintf(c,"%02x", (unsigned char)uuid[i]); c+= 2; } -- cgit v1.2.3