summaryrefslogtreecommitdiffstats
path: root/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'util.c')
-rw-r--r--util.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/util.c b/util.c
index 662061b..048c39f 100644
--- a/util.c
+++ b/util.c
@@ -336,17 +336,15 @@ 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 sep)
+char *__fname_from_uuid(int id[4], int swap, char *buf, char sep)
{
int i, j;
- int id;
char uuid[16];
char *c = buf;
strcpy(c, "UUID-");
c += strlen(c);
- copy_uuid(uuid, info->uuid, st->ss->swapuuid);
+ copy_uuid(uuid, id, swap);
for (i = 0; i < 4; i++) {
- id = uuid[i];
if (i)
*c++ = sep;
for (j = 3; j >= 0; j--) {
@@ -355,6 +353,12 @@ char *fname_from_uuid(struct supertype *st, struct mdinfo *info, char *buf, char
}
}
return buf;
+
+}
+
+char *fname_from_uuid(struct supertype *st, struct mdinfo *info, char *buf, char sep)
+{
+ return __fname_from_uuid(info->uuid, st->ss->swapuuid, buf, sep);
}
#ifndef MDASSEMBLE