Lines Matching refs:uuid
40 #include <uuid/uuid.h>
43 osdep_uuidgen(mkimg_uuid_t *uuid)
46 uuid_generate_time((void *)uuid);
51 #include <sys/uuid.h>
54 osdep_uuidgen(mkimg_uuid_t *uuid)
57 uuidgen((void *)uuid, 1);
66 osdep_uuidgen(mkimg_uuid_t *uuid)
79 uuid->time_low = (uint32_t)time;
80 uuid->time_mid = (uint16_t)(time >> 32);
81 uuid->time_hi_and_version = (uint16_t)(time >> 48) & 0xfff;
82 uuid->time_hi_and_version |= 1 << 12;
86 uuid->clock_seq_hi_and_reserved = (uint8_t)(seq >> 8) & 0x3f;
87 uuid->clock_seq_low = (uint8_t)seq;
90 uuid->node[i] = (uint8_t)random();
91 uuid->node[0] |= 0x01;
96 mkimg_uuid(mkimg_uuid_t *uuid)
102 osdep_uuidgen(uuid);
108 memcpy(uuid, gen, sizeof(*uuid));
112 mkimg_uuid_enc(void *buf, const mkimg_uuid_t *uuid)
117 le32enc(p, uuid->time_low);
118 le16enc(p + 4, uuid->time_mid);
119 le16enc(p + 6, uuid->time_hi_and_version);
120 p[8] = uuid->clock_seq_hi_and_reserved;
121 p[9] = uuid->clock_seq_low;
123 p[10 + i] = uuid->node[i];