File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# SPDX-License-Identifier: LGPL-2.1-or-later
22LIBNVME_UNRELEASED {
33 global:
4+ nvme_get_uuid_list;
45 nvme_set_etdas;
56 nvme_clear_etdas;
67 nvme_insert_tls_key_compat;
Original file line number Diff line number Diff line change @@ -168,6 +168,24 @@ int nvme_clear_etdas(int fd, bool *changed)
168168 return 0 ;
169169}
170170
171+ int nvme_get_uuid_list (int fd , struct nvme_id_uuid_list * uuid_list )
172+ {
173+ int err ;
174+ struct nvme_id_ctrl ctrl ;
175+
176+ memset (& ctrl , 0 , sizeof (struct nvme_id_ctrl ));
177+ err = nvme_identify_ctrl (fd , & ctrl );
178+ if (err ) {
179+ fprintf (stderr , "ERROR: nvme_identify_ctrl() failed 0x%x\n" , err );
180+ return err ;
181+ }
182+
183+ if ((ctrl .ctratt & NVME_CTRL_CTRATT_UUID_LIST ) == NVME_CTRL_CTRATT_UUID_LIST )
184+ err = nvme_identify_uuid (fd , uuid_list );
185+
186+ return err ;
187+ }
188+
171189int nvme_get_telemetry_max (int fd , enum nvme_telemetry_da * da , size_t * data_tx )
172190{
173191 _cleanup_free_ struct nvme_id_ctrl * id_ctrl = NULL ;
Original file line number Diff line number Diff line change @@ -56,6 +56,17 @@ int nvme_set_etdas(int fd, bool *changed);
5656 */
5757int nvme_clear_etdas (int fd , bool * changed );
5858
59+ /**
60+ * nvme_get_uuid_list - Returns the uuid list (if supported)
61+ * @fd: File descriptor of nvme device
62+ * @uuid_list: UUID list returned by identify UUID
63+ *
64+ * Return: The nvme command status if a response was received (see
65+ * &enum nvme_status_field) or -1 with errno set otherwise.
66+ */
67+ int nvme_get_uuid_list (int fd ,
68+ struct nvme_id_uuid_list * uuid_list );
69+
5970/**
6071 * nvme_get_telemetry_max() - Get telemetry limits
6172 * @fd: File descriptor of nvme device
You can’t perform that action at this time.
0 commit comments