Lines Matching defs:uuid
140 static image_desc_t *new_image_desc(const uuid_t *uuid,
147 memcpy(&desc->uuid, uuid, sizeof(uuid_t));
216 desc = new_image_desc(&toc_entry->uuid,
227 desc = new_image_desc(&toc_entry->uuid,
235 static image_desc_t *lookup_image_desc_from_uuid(const uuid_t *uuid)
240 if (memcmp(&desc->uuid, uuid, sizeof(uuid_t)) == 0)
346 if (memcmp(&toc_entry->uuid, &uuid_null, sizeof(uuid_t)) == 0) {
372 desc = lookup_image_desc_from_uuid(&toc_entry->uuid);
376 uuid_to_str(name, sizeof(name), &toc_entry->uuid);
379 desc = new_image_desc(&toc_entry->uuid, name, "blob");
399 static image_t *read_image_from_file(const uuid_t *uuid, const char *filename)
405 assert(uuid != NULL);
416 image->toc_e.uuid = *uuid;
572 * Append a null uuid entry to mark the end of ToC entries.
633 image = read_image_from_file(&desc->uuid,
683 static void parse_blob_opt(char *arg, uuid_t *uuid, char *filename, size_t len)
688 if (strncmp(p, "uuid=", strlen("uuid=")) == 0) {
689 p += strlen("uuid=");
690 uuid_from_str(uuid, p);
739 uuid_t uuid = uuid_null;
742 parse_blob_opt(optarg, &uuid,
745 if (memcmp(&uuid, &uuid_null, sizeof(uuid_t)) == 0 ||
749 desc = lookup_image_desc_from_uuid(&uuid);
751 uuid_to_str(name, sizeof(name), &uuid);
752 desc = new_image_desc(&uuid, name, "blob");
783 printf(" --blob uuid=...,file=...\tAdd an image with the given UUID pointed to by file.\n");
842 uuid_t uuid = uuid_null;
845 parse_blob_opt(optarg, &uuid,
848 if (memcmp(&uuid, &uuid_null, sizeof(uuid_t)) == 0 ||
852 desc = lookup_image_desc_from_uuid(&uuid);
854 uuid_to_str(name, sizeof(name), &uuid);
855 desc = new_image_desc(&uuid, name, "blob");
902 printf(" --blob uuid=...,file=...\tAdd or update an image with the given UUID pointed to by file.\n");
956 uuid_t uuid = uuid_null;
959 parse_blob_opt(optarg, &uuid,
962 if (memcmp(&uuid, &uuid_null, sizeof(uuid_t)) == 0 ||
966 desc = lookup_image_desc_from_uuid(&uuid);
968 uuid_to_str(name, sizeof(name), &uuid);
969 desc = new_image_desc(&uuid, name, "blob");
1042 printf(" --blob uuid=...,file=...\tUnpack an image with the given UUID to file.\n");
1101 uuid_t uuid = uuid_null;
1104 parse_blob_opt(optarg, &uuid,
1107 if (memcmp(&uuid, &uuid_null, sizeof(uuid_t)) == 0)
1110 desc = lookup_image_desc_from_uuid(&uuid);
1112 uuid_to_str(name, sizeof(name), &uuid);
1113 desc = new_image_desc(&uuid, name, "blob");
1173 printf(" --blob uuid=...\tRemove an image with the given UUID.\n");