We explicitly ask for a file descriptor in the API so use it. The caller
might not have set it in args.
For example, in nvme-cli when the libnvme wrappers are used to hide the
transport details from the nvme-cli core, the macros only pass the file
descriptor via the function arguments but don't set it in the arg
structs.
Signed-off-by: Daniel Wagner <dwagner@suse.de>
void *ptr = args->log;
int ret;
+ args->fd = fd;
+
/*
* 4k is the smallest possible transfer unit, so restricting to 4k
* avoids having to check the MDTS value of the controller.