/linux/lib/ |
H A D | uuid.c | 13 #include <linux/uuid.h> 26 * @uuid: where to put the generated UUID 33 void generate_random_uuid(unsigned char uuid[16]) in generate_random_uuid() 35 get_random_bytes(uuid, 16); in generate_random_uuid() 37 uuid[6] = (uuid[6] & 0x0F) | 0x40; in generate_random_uuid() 39 uuid[8] = (uuid[8] & 0x3F) | 0x80; in generate_random_uuid() 78 * @uuid: UUID string to check 88 bool uuid_is_valid(const char *uuid) in uuid_is_valid() argument 105 __uuid_parse(const char * uuid,__u8 b[16],const u8 ei[16]) __uuid_parse() argument 123 guid_parse(const char * uuid,guid_t * u) guid_parse() argument 129 uuid_parse(const char * uuid,uuid_t * u) uuid_parse() argument [all...] |
H A D | test_uuid.c | 2 * Test cases for lib/uuid.c module. 10 #include <linux/uuid.h> 13 const char *uuid; member 20 .uuid = "c33f4995-3701-450e-9fbf-206a2e98e576", 25 .uuid = "64b4371c-77c1-48f9-8221-29f054fc023b", 30 .uuid = "0cb4ddff-a545-4401-9d06-688af53e7f84", 70 if (guid_parse(data->uuid, &le)) in test_uuid_test() 71 test_uuid_failed("conversion", false, false, data->uuid, NULL); in test_uuid_test() 76 test_uuid_failed("cmp", false, false, data->uuid, buf); in test_uuid_test() 81 if (uuid_parse(data->uuid, in test_uuid_test() [all...] |
/linux/net/bluetooth/ |
H A D | eir.c | 54 u8 eir_append_service_data(u8 *eir, u16 eir_len, u16 uuid, u8 *data, in eir_append_service_data() argument 57 eir[eir_len++] = sizeof(u8) + sizeof(uuid) + data_len; in eir_append_service_data() 59 put_unaligned_le16(uuid, &eir[eir_len]); in eir_append_service_data() 60 eir_len += sizeof(uuid); in eir_append_service_data() 70 struct bt_uuid *uuid; in create_uuid16_list() local 75 list_for_each_entry(uuid, &hdev->uuids, list) { in create_uuid16_list() 78 if (uuid->size != 16) in create_uuid16_list() 81 uuid16 = get_unaligned_le16(&uuid->uuid[12]); in create_uuid16_list() 112 struct bt_uuid *uuid; in create_uuid32_list() local 145 struct bt_uuid *uuid; create_uuid128_list() local 368 eir_get_service_data(u8 * eir,size_t eir_len,u16 uuid,size_t * len) eir_get_service_data() argument [all...] |
/linux/fs/btrfs/ |
H A D | uuid-tree.c | 7 #include <linux/uuid.h> 15 #include "uuid-tree.h" 18 static void btrfs_uuid_to_key(const u8 *uuid, u8 type, struct btrfs_key *key) in btrfs_uuid_to_key() argument 21 key->objectid = get_unaligned_le64(uuid); in btrfs_uuid_to_key() 22 key->offset = get_unaligned_le64(uuid + sizeof(u64)); in btrfs_uuid_to_key() 26 static int btrfs_uuid_tree_lookup(struct btrfs_root *uuid_root, const u8 *uuid, in btrfs_uuid_tree_lookup() argument 48 btrfs_uuid_to_key(uuid, type, &key); in btrfs_uuid_tree_lookup() 65 "uuid item with illegal size %lu!", in btrfs_uuid_tree_lookup() 86 int btrfs_uuid_tree_add(struct btrfs_trans_handle *trans, const u8 *uuid, u8 type, in btrfs_uuid_tree_add() argument 99 ret = btrfs_uuid_tree_lookup(uuid_root, uuid, typ in btrfs_uuid_tree_add() 148 btrfs_uuid_tree_remove(struct btrfs_trans_handle * trans,const u8 * uuid,u8 type,u64 subid) btrfs_uuid_tree_remove() argument 230 btrfs_uuid_iter_rem(struct btrfs_root * uuid_root,u8 * uuid,u8 type,u64 subid) btrfs_uuid_iter_rem() argument 259 btrfs_check_uuid_tree_entry(struct btrfs_fs_info * fs_info,const u8 * uuid,u8 type,u64 subvolid) btrfs_check_uuid_tree_entry() argument 344 u8 uuid[BTRFS_UUID_SIZE]; btrfs_uuid_tree_iterate() local [all...] |
/linux/drivers/md/ |
H A D | dm-log-userspace-base.c | 47 char uuid[DM_UUID_LEN]; member 85 static int userspace_do_request(struct log_c *lc, const char *uuid, in userspace_do_request() argument 97 r = dm_consult_userspace(uuid, lc->luid, request_type, data, in userspace_do_request() 108 r = dm_consult_userspace(uuid, lc->luid, DM_ULOG_CTR, in userspace_do_request() 116 r = dm_consult_userspace(uuid, lc->luid, DM_ULOG_RESUME, NULL, in userspace_do_request() 164 r = userspace_do_request(lc, lc->uuid, DM_ULOG_FLUSH, NULL, 0, NULL, NULL); in do_flush() 227 strscpy(lc->uuid, argv[0], sizeof(lc->uuid)); in userspace_ctr() 263 r = dm_consult_userspace(lc->uuid, lc->luid, DM_ULOG_CTR, in userspace_ctr() 277 r = dm_consult_userspace(lc->uuid, l in userspace_ctr() [all...] |
H A D | dm-log-userspace-transfer.c | 153 * @uuid: log's universal unique identifier (must be DM_UUID_LEN in size) 170 int dm_consult_userspace(const char *uuid, uint64_t luid, int request_type, in dm_consult_userspace() argument 201 memcpy(tfr->uuid, uuid, DM_UUID_LEN); in dm_consult_userspace() 246 (strlen(uuid) > 8) ? in dm_consult_userspace() 247 (uuid + (strlen(uuid) - 8)) : (uuid), in dm_consult_userspace()
|
H A D | dm-ioctl.c | 41 * name or uuid. 51 char *uuid; member 75 * Protects use of mdptr to obtain hash cell name and uuid from mapped device. 116 c = strcmp(hc->uuid, str); in __get_uuid_cell() 183 c = strcmp(hc->uuid, new_hc->uuid); in __link_uuid() 216 static struct hash_cell *alloc_cell(const char *name, const char *uuid, in alloc_cell() argument 231 if (!uuid) in alloc_cell() 232 hc->uuid = NULL; in alloc_cell() 235 hc->uuid in alloc_cell() 262 dm_hash_insert(const char * name,const char * uuid,struct mapped_device * md) dm_hash_insert() argument 2223 dm_copy_name_and_uuid(struct mapped_device * md,char * name,char * uuid) dm_copy_name_and_uuid() argument [all...] |
/linux/drivers/firmware/arm_ffa/ |
H A D | bus.c | 30 while (!uuid_is_null(&id_table->uuid)) { in ffa_device_match() 36 if (uuid_is_null(&ffa_dev->uuid)) in ffa_device_match() 39 if (uuid_equal(&ffa_dev->uuid, &id_table->uuid)) in ffa_device_match() 53 if (uuid_is_null(&ffa_dev->uuid)) in ffa_device_probe() 72 ffa_dev->vm_id, &ffa_dev->uuid); in ffa_device_uevent() 81 &ffa_dev->uuid); in modalias_show() 99 return sprintf(buf, "%pUb\n", &ffa_dev->uuid); in uuid_show() 101 static DEVICE_ATTR_RO(uuid); 222 uuid_copy(&ffa_dev->uuid, in ffa_device_register() [all...] |
/linux/drivers/nvdimm/ |
H A D | btt_devs.c | 23 kfree(nd_btt->uuid); in nd_btt_release() 71 if (nd_btt->uuid) in uuid_show() 72 return sprintf(buf, "%pUb\n", nd_btt->uuid); in uuid_show() 83 rc = nd_uuid_store(dev, &nd_btt->uuid, buf, len); in uuid_store() 90 static DEVICE_ATTR_RW(uuid); 184 unsigned long lbasize, uuid_t *uuid, in __nd_btt_create() argument 199 if (uuid) { in __nd_btt_create() 200 uuid = kmemdup(uuid, 16, GFP_KERNEL); in __nd_btt_create() 201 if (!uuid) in __nd_btt_create() [all...] |
H A D | namespace_devs.c | 32 kfree(nspm->uuid); in namespace_pmem_release() 46 uuid2 = nspm->uuid; in is_uuid_busy() 50 uuid2 = nd_btt->uuid; in is_uuid_busy() 54 uuid2 = nd_pfn->uuid; in is_uuid_busy() 71 * nd_is_uuid_unique - verify that no other namespace has @uuid 73 * @uuid: uuid to check 75 * Returns: %true if the uuid is unique, %false if not 77 bool nd_is_uuid_unique(struct device *dev, uuid_t *uuid) in nd_is_uuid_unique() argument 84 if (device_for_each_child(&nvdimm_bus->dev, uuid, in nd_is_uuid_unique() 739 uuid_not_set(const uuid_t * uuid,struct device * dev,const char * where) uuid_not_set() argument 759 uuid_t *uuid = NULL; __size_store() local 945 uuid_t *uuid = namespace_to_uuid(dev); uuid_show() local 1014 uuid_t uuid; namespace_update_uuid() local 1036 uuid_t *uuid = NULL; uuid_store() local 1144 uuid_t *uuid = NULL; dpa_extents_show() local 1562 has_uuid_at_pos(struct nd_region * nd_region,const uuid_t * uuid,u64 cookie,u16 pos) has_uuid_at_pos() argument 1683 uuid_t uuid; create_namespace_pmem() local 1898 uuid_t *uuid = namespace_to_uuid(devs[i]); add_namespace_resource() local [all...] |
H A D | nd.h | 257 uuid_t *uuid) in nsl_get_uuid() argument 260 import_uuid(uuid, nd_label->cxl.uuid); in nsl_get_uuid() 262 import_uuid(uuid, nd_label->efi.uuid); in nsl_get_uuid() 263 return uuid; in nsl_get_uuid() 268 const uuid_t *uuid) in nsl_set_uuid() argument 271 export_uuid(nd_label->cxl.uuid, uuid); in nsl_set_uuid() 273 export_uuid(nd_label->efi.uuid, uui in nsl_set_uuid() 279 nsl_uuid_equal(struct nvdimm_drvdata * ndd,struct nd_namespace_label * nd_label,const uuid_t * uuid) nsl_uuid_equal() argument 454 uuid_t *uuid; global() member 469 uuid_t *uuid; global() member [all...] |
H A D | label.c | 7 #include <linux/uuid.h> 332 char *nd_label_gen_id(struct nd_label_id *label_id, const uuid_t *uuid, in nd_label_gen_id() argument 335 if (!label_id || !uuid) in nd_label_gen_id() 337 snprintf(label_id->id, ND_LABEL_ID_SIZE, "pmem-%pUb", uuid); in nd_label_gen_id() 750 static enum nvdimm_claim_class uuid_to_nvdimm_cclass(uuid_t *uuid) in uuid_to_nvdimm_cclass() argument 752 if (uuid_equal(uuid, &nvdimm_btt_uuid)) in uuid_to_nvdimm_cclass() 754 else if (uuid_equal(uuid, &nvdimm_btt2_uuid)) in uuid_to_nvdimm_cclass() 756 else if (uuid_equal(uuid, &nvdimm_pfn_uuid)) in uuid_to_nvdimm_cclass() 758 else if (uuid_equal(uuid, &nvdimm_dax_uuid)) in uuid_to_nvdimm_cclass() 760 else if (uuid_equal(uuid, in uuid_to_nvdimm_cclass() 845 uuid_t uuid; nsl_set_claim_class() local 864 uuid_t uuid; nsl_get_claim_class() local 1012 del_labels(struct nd_mapping * nd_mapping,uuid_t * uuid) del_labels() argument [all...] |
/linux/tools/power/acpi/tools/pfrut/ |
H A D | pfrut.c | 24 #include <uuid/uuid.h> 169 char *uuid; in print_cap() local 171 uuid = malloc(37); in print_cap() 172 if (!uuid) { in print_cap() 173 perror("Can not allocate uuid buffer\n"); in print_cap() 179 uuid_unparse(cap->code_type, uuid); in print_cap() 180 printf("code injection image type:%s\n", uuid); in print_cap() 184 uuid_unparse(cap->drv_type, uuid); in print_cap() 185 printf("driver update image type:%s\n", uuid); in print_cap() [all...] |
/linux/drivers/thunderbolt/ |
H A D | property.c | 13 #include <linux/uuid.h> 32 u32 uuid[4]; member 177 dir->uuid = kmemdup(&block[dir_offset], sizeof(*dir->uuid), in __tb_property_parse_dir() 179 if (!dir->uuid) { in __tb_property_parse_dir() 237 * @uuid: UUID used to identify the particular directory 239 * Creates new, empty property directory. If @uuid is %NULL then the 242 struct tb_property_dir *tb_property_create_dir(const uuid_t *uuid) in tb_property_create_dir() argument 251 if (uuid) { in tb_property_create_dir() 252 dir->uuid in tb_property_create_dir() [all...] |
/linux/include/linux/ |
H A D | uuid.h | 91 static inline bool uuid_is_null(const uuid_t *uuid) in uuid_is_null() argument 93 return uuid_equal(uuid, &uuid_null); in uuid_is_null() 96 void generate_random_uuid(unsigned char uuid[16]); 102 bool __must_check uuid_is_valid(const char *uuid); 107 int guid_parse(const char *uuid, guid_t *u); 108 int uuid_parse(const char *uuid, uuid_t *u);
|
H A D | statfs.h | 54 /* Fold 16 bytes uuid to 64 bit fsid */ 55 static inline __kernel_fsid_t uuid_to_fsid(__u8 *uuid) in uuid_to_fsid() argument 57 return u64_to_fsid(le64_to_cpup((void *)uuid) ^ in uuid_to_fsid() 58 le64_to_cpup((void *)(uuid + sizeof(u64)))); in uuid_to_fsid()
|
/linux/fs/nfs_common/ |
H A D | nfslocalio.c | 69 uuid_gen(&nfs_uuid->uuid); in nfs_uuid_begin() 91 static nfs_uuid_t * nfs_uuid_lookup_locked(const uuid_t *uuid) in nfs_uuid_lookup_locked() argument 96 if (uuid_equal(&nfs_uuid->uuid, uuid)) in nfs_uuid_lookup_locked() 104 void nfs_uuid_is_local(const uuid_t *uuid, struct list_head *list, in nfs_uuid_is_local() argument 111 nfs_uuid = nfs_uuid_lookup_locked(uuid); in nfs_uuid_is_local() 265 struct nfsd_file *nfs_open_local_fh(nfs_uuid_t *uuid, in nfs_open_local_fh() argument 277 * uuid->net is NOT a counted reference, but rcu_read_lock() ensures that in nfs_open_local_fh() 278 * if uuid->net is not NULL, then calling nfsd_net_try_get() is safe in nfs_open_local_fh() 285 net = rcu_dereference(uuid in nfs_open_local_fh() [all...] |
/linux/fs/afs/ |
H A D | vlclient.c | 46 struct afs_uuid *uuid; in afs_deliver_vl_get_entry_by_name_u() local 62 uuid = (struct afs_uuid *)&entry->fs_server[n]; in afs_deliver_vl_get_entry_by_name_u() 63 uuid->time_low = xdr->time_low; in afs_deliver_vl_get_entry_by_name_u() 64 uuid->time_mid = htons(ntohl(xdr->time_mid)); in afs_deliver_vl_get_entry_by_name_u() 65 uuid->time_hi_and_version = htons(ntohl(xdr->time_hi_and_version)); in afs_deliver_vl_get_entry_by_name_u() 66 uuid->clock_seq_hi_and_reserved = (u8)ntohl(xdr->clock_seq_hi_and_reserved); in afs_deliver_vl_get_entry_by_name_u() 67 uuid->clock_seq_low = (u8)ntohl(xdr->clock_seq_low); in afs_deliver_vl_get_entry_by_name_u() 69 uuid->node[j] = (u8)ntohl(xdr->node[j]); in afs_deliver_vl_get_entry_by_name_u() 107 * Dispatch a get volume entry by name or ID operation (uuid variant). If the 189 /* Extract the returned uuid, uniquifie in afs_deliver_vl_get_addrs_u() 259 afs_vl_get_addrs_u(struct afs_vl_cursor * vc,const uuid_t * uuid) afs_vl_get_addrs_u() argument 635 afs_yfsvl_get_endpoints(struct afs_vl_cursor * vc,const uuid_t * uuid) afs_yfsvl_get_endpoints() argument [all...] |
H A D | cmservice.c | 420 if (memcmp(r, &call->net->uuid, sizeof(call->net->uuid)) == 0) in SRXAFSCB_ProbeUuid() 498 __be32 uuid[11]; in SRXAFSCB_TellMeAboutYourself() member 513 reply.ia.uuid[0] = call->net->uuid.time_low; in SRXAFSCB_TellMeAboutYourself() 514 reply.ia.uuid[1] = htonl(ntohs(call->net->uuid.time_mid)); in SRXAFSCB_TellMeAboutYourself() 515 reply.ia.uuid[2] = htonl(ntohs(call->net->uuid.time_hi_and_version)); in SRXAFSCB_TellMeAboutYourself() 516 reply.ia.uuid[ in SRXAFSCB_TellMeAboutYourself() [all...] |
H A D | server.c | 37 static struct afs_server *afs_find_server_by_uuid(struct afs_cell *cell, const uuid_t *uuid) in afs_find_server_by_uuid() argument 43 _enter("%pU", uuid); in afs_find_server_by_uuid() 49 diff = memcmp(uuid, &server->uuid, sizeof(*uuid)); in afs_find_server_by_uuid() 86 diff = memcmp(&(*candidate)->uuid, &server->uuid, sizeof(uuid_t)); in afs_install_server() 113 static struct afs_server *afs_alloc_server(struct afs_cell *cell, const uuid_t *uuid) in afs_alloc_server() argument 128 server->uuid = *uuid; in afs_alloc_server() 179 afs_lookup_server(struct afs_cell * cell,struct key * key,const uuid_t * uuid,u32 addr_version) afs_lookup_server() argument [all...] |
/linux/drivers/mfd/ |
H A D | wm831x-otp.c | 59 char uuid[WM831X_UNIQUE_ID_LEN]; in wm831x_otp_init() local 67 ret = wm831x_unique_id_read(wm831x, uuid); in wm831x_otp_init() 69 add_device_randomness(uuid, sizeof(uuid)); in wm831x_otp_init()
|
/linux/drivers/tee/amdtee/ |
H A D | core.c | 183 } *uuid = ptr; in copy_ta_binary() local 188 TA_LOAD_PATH, uuid->lo, uuid->mid, uuid->hi_ver, in copy_ta_binary() 189 uuid->seq_n[0], uuid->seq_n[1], in copy_ta_binary() 190 uuid->seq_n[2], uuid->seq_n[3], in copy_ta_binary() 191 uuid->seq_n[4], uuid in copy_ta_binary() [all...] |
/linux/fs/nfsd/ |
H A D | localio.c | 144 uuid_t uuid; member 153 nfs_uuid_is_local(&argp->uuid, &nn->local_clients, in localio_proc_uuid_is_local() 164 u8 uuid[UUID_SIZE]; in localio_decode_uuidarg() local 166 if (decode_opaque_fixed(xdr, uuid, UUID_SIZE)) in localio_decode_uuidarg() 168 import_uuid(&argp->uuid, uuid); in localio_decode_uuidarg()
|
/linux/Documentation/ABI/testing/ |
H A D | sysfs-bus-optee-devices | 1 What: /sys/bus/tee/devices/optee-ta-<uuid>/ 6 OP-TEE bus provides reference to registered drivers under this directory. The <uuid> 8 are free to create needed API under optee-ta-<uuid> directory. 10 What: /sys/bus/tee/devices/optee-ta-<uuid>/need_supplicant
|
/linux/drivers/hwtracing/stm/ |
H A D | p_sys-t.c | 11 #include <linux/uuid.h> 107 uuid_t uuid; member 123 uuid_gen(&pn->uuid); in sys_t_policy_node_init() 151 return sprintf(page, "%pU\n", &pn->uuid); in sys_t_policy_uuid_show() 163 ret = uuid_parse(page, &pn->uuid); in sys_t_policy_uuid_store() 169 CONFIGFS_ATTR(sys_t_policy_, uuid); 376 u8 uuid[UUID_SIZE]; in sys_t_write() local 407 export_uuid(uuid, &op->node.uuid); in sys_t_write() 408 sz = stm_data_write(data, m, c, false, uuid, sizeo in sys_t_write() [all...] |