Lines Matching refs:uuid
141 static image_desc_t *new_image_desc(const uuid_t *uuid, in new_image_desc() argument
148 memcpy(&desc->uuid, uuid, sizeof(uuid_t)); in new_image_desc()
217 desc = new_image_desc(&toc_entry->uuid, in fill_image_descs()
228 desc = new_image_desc(&toc_entry->uuid, in fill_image_descs()
236 static image_desc_t *lookup_image_desc_from_uuid(const uuid_t *uuid) in lookup_image_desc_from_uuid() argument
241 if (memcmp(&desc->uuid, uuid, sizeof(uuid_t)) == 0) in lookup_image_desc_from_uuid()
347 if (memcmp(&toc_entry->uuid, &uuid_null, sizeof(uuid_t)) == 0) { in parse_fip()
373 desc = lookup_image_desc_from_uuid(&toc_entry->uuid); in parse_fip()
377 uuid_to_str(name, sizeof(name), &toc_entry->uuid); in parse_fip()
380 desc = new_image_desc(&toc_entry->uuid, name, "blob"); in parse_fip()
400 static image_t *read_image_from_file(const uuid_t *uuid, const char *filename) in read_image_from_file() argument
406 assert(uuid != NULL); in read_image_from_file()
417 image->toc_e.uuid = *uuid; in read_image_from_file()
634 image = read_image_from_file(&desc->uuid, in update_fip()
684 static void parse_blob_opt(char *arg, uuid_t *uuid, char *filename, size_t len) in parse_blob_opt() argument
691 uuid_from_str(uuid, p); in parse_blob_opt()
740 uuid_t uuid = uuid_null; in create_cmd() local
743 parse_blob_opt(optarg, &uuid, in create_cmd()
746 if (memcmp(&uuid, &uuid_null, sizeof(uuid_t)) == 0 || in create_cmd()
750 desc = lookup_image_desc_from_uuid(&uuid); in create_cmd()
752 uuid_to_str(name, sizeof(name), &uuid); in create_cmd()
753 desc = new_image_desc(&uuid, name, "blob"); in create_cmd()
843 uuid_t uuid = uuid_null; in update_cmd() local
846 parse_blob_opt(optarg, &uuid, in update_cmd()
849 if (memcmp(&uuid, &uuid_null, sizeof(uuid_t)) == 0 || in update_cmd()
853 desc = lookup_image_desc_from_uuid(&uuid); in update_cmd()
855 uuid_to_str(name, sizeof(name), &uuid); in update_cmd()
856 desc = new_image_desc(&uuid, name, "blob"); in update_cmd()
957 uuid_t uuid = uuid_null; in unpack_cmd() local
960 parse_blob_opt(optarg, &uuid, in unpack_cmd()
963 if (memcmp(&uuid, &uuid_null, sizeof(uuid_t)) == 0 || in unpack_cmd()
967 desc = lookup_image_desc_from_uuid(&uuid); in unpack_cmd()
969 uuid_to_str(name, sizeof(name), &uuid); in unpack_cmd()
970 desc = new_image_desc(&uuid, name, "blob"); in unpack_cmd()
1102 uuid_t uuid = uuid_null; in remove_cmd() local
1105 parse_blob_opt(optarg, &uuid, in remove_cmd()
1108 if (memcmp(&uuid, &uuid_null, sizeof(uuid_t)) == 0) in remove_cmd()
1111 desc = lookup_image_desc_from_uuid(&uuid); in remove_cmd()
1113 uuid_to_str(name, sizeof(name), &uuid); in remove_cmd()
1114 desc = new_image_desc(&uuid, name, "blob"); in remove_cmd()