X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fmdadm.git;a=blobdiff_plain;f=util.c;h=653796f10474803c70ede50b984d7db20b36cbaa;hp=b65d2ad890d5e851bad2dd1f3392550ce002ce55;hb=ff54de6e47163944185f231700e72d3122b58f4c;hpb=d7288ddc3a06a0912f5f0a3f23ccca76a66ff332 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; }