Lines Matching defs:u
64 struct dce_uuid u;
129 gpt_uuid_numeric(char *buf, size_t bufsiz, const struct dce_uuid *u)
133 u->time_low, u->time_mid, u->time_hi_and_version,
134 u->clock_seq_hi_and_reserved, u->clock_seq_low, u->node[0],
135 u->node[1], u->node[2], u->node[3], u->node[4], u->node[5]);
140 gpt_uuid_symbolic(char *buf, size_t bufsiz, const struct dce_uuid *u)
145 if (memcmp(&gpt_nv[i].u, u, sizeof(*u)) == 0)
151 gpt_uuid_descriptive(char *buf, size_t bufsiz, const struct dce_uuid *u)
156 if (memcmp(&gpt_nv[i].u, u, sizeof(*u)) == 0)
165 struct dce_uuid u;
166 gpt_uuid_to_dce(uu, &u);
170 if ((r = gpt_uuid_symbolic(buf, bufsiz, &u)) != -1)
175 if ((r = gpt_uuid_descriptive(buf, bufsiz, &u)) != -1)
178 return gpt_uuid_numeric(buf, bufsiz, &u);
182 gpt_uuid_parse_numeric(const char *s, struct dce_uuid *u)
187 memset(u, 0, sizeof(*u));
193 &u->time_low, &u->time_mid, &u->time_hi_and_version,
194 &u->clock_seq_hi_and_reserved, &u->clock_seq_low, &u->node[0],
195 &u->node[1], &u->node[2], &u->node[3], &u->node[4], &u->node[5]);
202 n = u->clock_seq_hi_and_reserved;
211 gpt_uuid_parse_symbolic(const char *s, struct dce_uuid *u)
217 *u = gpt_nv[i].u;
226 struct dce_uuid u;
228 if (gpt_uuid_parse_numeric(s, &u) != -1) {
229 gpt_dce_to_uuid(&u, uuid);
233 if (gpt_uuid_parse_symbolic(s, &u) == -1)
236 gpt_dce_to_uuid(&u, uuid);
249 gpt_uuid_numeric(buf, sizeof(buf), &gpt_nv[i].u);
267 gpt_uuid_create(gpt_type_t t, gpt_uuid_t u, uint16_t *b, size_t s)
269 gpt_dce_to_uuid(&gpt_nv[t].u, u);
275 gpt_uuid_random(gpt_t gpt, struct dce_uuid *u, size_t n)
287 for (p = (uint8_t *)u; n > 0; p += nread, n -= (size_t)nread) {
305 u->time_hi_and_version &= (uint16_t)~0xf000;
306 u->time_hi_and_version |= 0x4000;
322 gpt_uuid_tstamp(gpt_t gpt, struct dce_uuid *u, size_t l)
341 u->time_low = x & 0xffffffff;
342 u->time_mid = (x >> 32) & 0xffff;
343 u->time_hi_and_version = 0x1000 | ((x >> 48) & 0xfff);
349 u->clock_seq_hi_and_reserved = 0;
350 u->clock_seq_low = 0;
355 memset(u->node, 0, sizeof(u->node));
364 struct dce_uuid u;
367 rv = gpt_uuid_tstamp(gpt, &u, sizeof(u));
369 rv = gpt_uuid_random(gpt, &u, sizeof(u));
375 u.clock_seq_hi_and_reserved &= (uint8_t)~0x40;
376 u.clock_seq_hi_and_reserved |= 0x80;
378 gpt_dce_to_uuid(&u, t);