Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions libnvme/src/nvme/linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ void nvme_transport_handle_set_decide_retry(struct nvme_transport_handle *hdl,

static int __nvme_transport_handle_open_direct(struct nvme_transport_handle *hdl, const char *devname)
{
struct nvme_passthru_cmd dummy = { 0 };
_cleanup_free_ char *path = NULL;
char *name = basename(devname);
int ret, id, ns;
Expand Down Expand Up @@ -107,8 +108,8 @@ static int __nvme_transport_handle_open_direct(struct nvme_transport_handle *hdl
return -EINVAL;
}

ret = ioctl(hdl->fd, NVME_IOCTL_ADMIN64_CMD, NULL);
if (ret == -1 && errno != ENOTTY)
ret = ioctl(hdl->fd, NVME_IOCTL_ADMIN64_CMD, &dummy);
if (ret > 0)
hdl->ioctl64 = true;

return 0;
Expand Down
Loading