Lines Matching full:guid
360 /* GUID conversion functions. Accepted format:
366 int StrToGuid(const char *str, Guid *guid) {
392 guid->u.Uuid.time_low = htole32(time_low);
393 guid->u.Uuid.time_mid = htole16(time_mid);
394 guid->u.Uuid.time_high_and_version = htole16(time_high_and_version);
396 guid->u.Uuid.clock_seq_high_and_reserved = chunk[3] & 0xff;
397 guid->u.Uuid.clock_seq_low = chunk[4] & 0xff;
398 guid->u.Uuid.node[0] = chunk[5] & 0xff;
399 guid->u.Uuid.node[1] = chunk[6] & 0xff;
400 guid->u.Uuid.node[2] = chunk[7] & 0xff;
401 guid->u.Uuid.node[3] = chunk[8] & 0xff;
402 guid->u.Uuid.node[4] = chunk[9] & 0xff;
403 guid->u.Uuid.node[5] = chunk[10] & 0xff;
407 void GuidToStr(const Guid *guid, char *str, unsigned int buflen) {
411 le32toh(guid->u.Uuid.time_low),
412 le16toh(guid->u.Uuid.time_mid),
413 le16toh(guid->u.Uuid.time_high_and_version),
414 guid->u.Uuid.clock_seq_high_and_reserved,
415 guid->u.Uuid.clock_seq_low,
416 guid->u.Uuid.node[0], guid->u.Uuid.node[1],
417 guid->u.Uuid.node[2], guid->u.Uuid.node[3],
418 guid->u.Uuid.node[4], guid->u.Uuid.node[5]) == GUID_STRLEN-1);
631 const Guid guid_chromeos_firmware = GPT_ENT_TYPE_CHROMEOS_FIRMWARE;
632 const Guid guid_chromeos_kernel = GPT_ENT_TYPE_CHROMEOS_KERNEL;
633 const Guid guid_chromeos_rootfs = GPT_ENT_TYPE_CHROMEOS_ROOTFS;
634 const Guid guid_linux_data = GPT_ENT_TYPE_LINUX_DATA;
635 const Guid guid_chromeos_reserved = GPT_ENT_TYPE_CHROMEOS_RESERVED;
636 const Guid guid_efi = GPT_ENT_TYPE_EFI;
637 const Guid guid_unused = GPT_ENT_TYPE_UNUSED;
640 const Guid *type;
656 int ResolveType(const Guid *type, char *buf) {
659 if (!memcmp(type, supported_types[i].type, sizeof(Guid))) {
667 int SupportedType(const char *name, Guid *type) {
671 memcpy(type, supported_types[i].type, sizeof(Guid));
866 (!memcmp(&a->disk_uuid, &b->disk_uuid, sizeof(Guid))))
922 memcpy(&target->disk_uuid, &source->disk_uuid, sizeof(Guid));
1004 int GuidEqual(const Guid *guid1, const Guid *guid2) {
1005 return (0 == memcmp(guid1, guid2, sizeof(Guid)));
1008 Guid *gp) {
1018 require(snprintf(str, buflen, "PMBR (Boot GUID: %s)", buf) < buflen);
1023 int __GenerateGuid(Guid *newguid) { return CGPT_FAILED; };
1025 int GenerateGuid(Guid *newguid) __attribute__((weak, alias("__GenerateGuid")));