diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 11:08:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 11:09:05 +0000 |
commit | 81e5ef4ae340ae4041f8029e7c14a3bc8baab46d (patch) | |
tree | 3b0b740dd83d6a1244e81e4270497ad8db31a9b7 /plugins/ocp/ocp-utils.h | |
parent | Releasing debian version 2.8-2. (diff) | |
download | nvme-cli-81e5ef4ae340ae4041f8029e7c14a3bc8baab46d.tar.xz nvme-cli-81e5ef4ae340ae4041f8029e7c14a3bc8baab46d.zip |
Merging upstream version 2.9.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | plugins/ocp/ocp-utils.h | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/plugins/ocp/ocp-utils.h b/plugins/ocp/ocp-utils.h index d02bea9..1512db8 100644 --- a/plugins/ocp/ocp-utils.h +++ b/plugins/ocp/ocp-utils.h @@ -1,18 +1,32 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */ /* - * Copyright (c) 2022 Solidigm. + * Copyright (c) 2022-2024 Solidigm. * * Author: leonardo.da.cunha@solidigm.com */ #include "nvme.h" +/* + * UUID assigned for OCP. + */ +extern const unsigned char ocp_uuid[NVME_UUID_LEN]; + /** * ocp_get_uuid_index() - Get OCP UUID index * @dev: nvme device * @index: integer pointer to here to save the index - * @result: The command completion result from CQE dword0 * - * Return: Zero if nvme device has UUID list log page, or result of get uuid list otherwise. + * Return: Zero if nvme device has UUID list identify page, or positive result of get uuid list + * or negative POSIX error code otherwise. + */ +int ocp_get_uuid_index(struct nvme_dev *dev, __u8 *index); + +/** + * ocp_find_uuid_index() - Find OCP UUID index in UUID list + * @uuid_list: uuid_list retrieved from Identify UUID List (CNS 0x17) + * @index: integer pointer to here to save the index + * + * Return: Zero if nvme device has UUID list log page, Negative POSIX error code otherwise. */ -int ocp_get_uuid_index(struct nvme_dev *dev, int *index); +int ocp_find_uuid_index(struct nvme_id_uuid_list *uuid_list, __u8 *index); |