aboutsummaryrefslogtreecommitdiff
path: root/lib/lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/lib.c')
-rw-r--r--lib/lib.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/lib.c b/lib/lib.c
index 871eda7e..955960ca 100644
--- a/lib/lib.c
+++ b/lib/lib.c
@@ -988,3 +988,14 @@ void create_uuid(char *uuid)
// should never collide with anybody actually using a macaddr.
uuid[11] |= 128;
}
+
+char *show_uuid(char *uuid)
+{
+ char *out = libbuf;
+ int i;
+
+ for (i=0; i<16; i++) out+=sprintf(out, "-%02x"+!(0x550&(1<<i)), uuid[i]);
+ *out = 0;
+
+ return libbuf;
+}