static inline int nvme_identify_independent_identify_ns(int fd, __u32 nsid,
struct nvme_id_independent_id_ns *ns)
{
- struct nvme_identify_args args = {
- .result = NULL,
- .data = ns,
- .args_size = sizeof(args),
- .fd = fd,
- .timeout = NVME_DEFAULT_IOCTL_TIMEOUT,
- .cns = NVME_IDENTIFY_CNS_CSI_INDEPENDENT_ID_NS,
- .csi = NVME_CSI_NVM,
- .nsid = nsid,
- .cntid = NVME_CNTLID_NONE,
- .cns_specific_id = NVME_CNSSPECID_NONE,
- .uuidx = NVME_UUID_NONE,
- };
-
- return nvme_identify(&args);
+ return nvme_identify_cns_nsid(
+ fd, NVME_IDENTIFY_CNS_CSI_INDEPENDENT_ID_NS, nsid, ns);
}
/**
static inline int nvme_zns_identify_ns(int fd, __u32 nsid,
struct nvme_zns_id_ns *data)
{
- struct nvme_identify_args args = {
- .result = NULL,
- .data = data,
- .args_size = sizeof(args),
- .fd = fd,
- .timeout = NVME_DEFAULT_IOCTL_TIMEOUT,
- .cns = NVME_IDENTIFY_CNS_CSI_NS,
- .csi = NVME_CSI_ZNS,
- .nsid = nsid,
- .cntid = NVME_CNTLID_NONE,
- .cns_specific_id = NVME_CNSSPECID_NONE,
- };
-
- return nvme_identify(&args);
+ return nvme_identify_ns_csi(
+ fd, nsid, NVME_UUID_NONE, NVME_CSI_ZNS, data);
}
/**