NVME_UUID_NONE, NVME_CSI_NVM, cap);
}
-int nvme_identify_secondary_ctrl_list(int fd, __u16 cntid,
+int nvme_identify_secondary_ctrl_list(int fd, __u32 nsid, __u16 cntid,
struct nvme_secondary_ctrl_list *list)
{
BUILD_ASSERT(sizeof(struct nvme_secondary_ctrl_list) == 4096);
return nvme_identify(fd, NVME_IDENTIFY_CNS_SECONDARY_CTRL_LIST,
- NVME_NSID_NONE, cntid, NVME_NVMSETID_NONE,
+ nsid, cntid, NVME_NVMSETID_NONE,
NVME_UUID_NONE, NVME_CSI_NVM, list);
}
/**
* nvme_identify_secondary_ctrl_list() - Retrieves secondary controller list
* @fd: File descriptor of nvme device
+ * @nsid: Namespace identifier
* @cntid: Return controllers starting at this identifier
* @sc_list: User space destination address to transfer the data
*
* Return: The nvme command status if a response was received (see
* &enum nvme_status_field) or -1 with errno set otherwise.
*/
-int nvme_identify_secondary_ctrl_list(int fd, __u16 cntid,
+int nvme_identify_secondary_ctrl_list(int fd, __u32 nsid, __u16 cntid,
struct nvme_secondary_ctrl_list *list);
/**
printf(" Identify Primary:\n");
else
printf(" ERROR: Identify Primary:%x\n", ret);
- ret = nvme_identify_secondary_ctrl_list(fd, 0, &sec);
+ ret = nvme_identify_secondary_ctrl_list(fd, 1, 0, &sec);
if (!ret)
printf(" Identify Secondary:\n");
else