Lines Matching full:uuid
41 * name or uuid.
51 char *uuid; member
77 * Protects use of mdptr to obtain hash cell name and uuid from mapped device.
118 c = strcmp(hc->uuid, str); in __get_uuid_cell()
185 c = strcmp(hc->uuid, new_hc->uuid); in __link_uuid()
218 static struct hash_cell *alloc_cell(const char *name, const char *uuid, in alloc_cell() argument
233 if (!uuid) in alloc_cell()
234 hc->uuid = NULL; in alloc_cell()
237 hc->uuid = kstrdup(uuid, GFP_KERNEL); in alloc_cell()
238 if (!hc->uuid) { in alloc_cell()
255 kfree(hc->uuid); in free_cell()
278 strcpy(context->dev_uuid, hc->uuid ? : ""); in dm_ima_init_context()
335 * The kdev_t and uuid of a device can never change once it is
338 static int dm_hash_insert(const char *name, const char *uuid, struct mapped_device *md) in dm_hash_insert() argument
345 cell = alloc_cell(name, uuid, md); in dm_hash_insert()
361 if (uuid) { in dm_hash_insert()
362 hc = __get_uuid_cell(uuid); in dm_hash_insert()
481 * Set the uuid of a hash_cell that isn't already set.
486 hc->uuid = new_uuid; in __set_cell_uuid()
546 change_uuid ? "uuid" : "name", in dm_hash_rename()
561 param->name, change_uuid ? "uuid " : "", new); in dm_hash_rename()
569 * Does this device already have a uuid? in dm_hash_rename()
571 if (change_uuid && hc->uuid) { in dm_hash_rename()
572 DMERR("Unable to change uuid of mapped device %s to %s " in dm_hash_rename()
573 "because uuid is already set to %s", in dm_hash_rename()
574 param->name, new, hc->uuid); in dm_hash_rename()
680 val = hc->uuid ? hc->uuid : ""; in filter_device()
718 if (!filter_device(hc, param->name, param->uuid)) in list_devices()
736 if (hc->uuid) { in list_devices()
737 len = strlen(hc->uuid); in list_devices()
743 memcpy(event_nr + 2, hc->uuid, len); in list_devices()
975 r = dm_hash_insert(param->name, *param->uuid ? param->uuid : NULL, md); in dev_create()
992 * Always use UUID for lookups if it's present, otherwise use name or dev.
998 if (*param->uuid) { in __find_device_hash_cell()
1000 DMERR("Invalid ioctl structure: uuid %s, name %s, dev %llx", in __find_device_hash_cell()
1001 param->uuid, param->name, (unsigned long long)param->dev); in __find_device_hash_cell()
1005 hc = __get_uuid_cell(param->uuid); in __find_device_hash_cell()
1026 * Sneakily write in both the name and the uuid in __find_device_hash_cell()
1030 if (hc->uuid) in __find_device_hash_cell()
1031 strscpy(param->uuid, hc->uuid, sizeof(param->uuid)); in __find_device_hash_cell()
1033 param->uuid[0] = '\0'; in __find_device_hash_cell()
1142 DMERR("Invalid new mapped device name or uuid string supplied."); in dev_rename()
2147 } else if (*param->uuid && *param->name) { in validate_params()
2148 DMERR("only supply one of name or uuid, cmd(%u)", cmd); in validate_params()
2154 param->uuid[DM_UUID_LEN - 1] = '\0'; in validate_params()
2327 * dm_copy_name_and_uuid - Copy mapped device name & uuid into supplied buffers
2330 * @uuid: Buffer (size DM_UUID_LEN) for uuid or empty string if uuid not defined
2332 int dm_copy_name_and_uuid(struct mapped_device *md, char *name, char *uuid) in dm_copy_name_and_uuid() argument
2349 if (uuid) in dm_copy_name_and_uuid()
2350 strcpy(uuid, hc->uuid ? : ""); in dm_copy_name_and_uuid()
2401 r = dm_hash_insert(dmi->name, *dmi->uuid ? dmi->uuid : NULL, md); in dm_early_create()