+static void make_v4_uuid(unsigned char *id) {
+ /* Stolen from generate_random_uuid() of drivers/char/random.c
+ * in the kernel sources */
+
+ /* Set UUID version to 4 --- truly random generation */
+ id[6] = (id[6] & 0x0F) | 0x40;
+
+ /* Set the UUID variant to DCE */
+ id[8] = (id[8] & 0x3F) | 0x80;
+}
+