diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-08-15 12:26:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-08-15 12:26:29 +0000 |
commit | 33b8fe1a294d670d67a2e9802ca0c753826b1562 (patch) | |
tree | c7909b9865f0ee1b4f517d16283a0420ce08566b /src/nvme/fabrics.c | |
parent | Releasing debian version 1.1~rc0-1. (diff) | |
download | libnvme-33b8fe1a294d670d67a2e9802ca0c753826b1562.tar.xz libnvme-33b8fe1a294d670d67a2e9802ca0c753826b1562.zip |
Merging upstream version 1.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | src/nvme/fabrics.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/nvme/fabrics.c b/src/nvme/fabrics.c index ee20da2..b68b7b9 100644 --- a/src/nvme/fabrics.c +++ b/src/nvme/fabrics.c @@ -438,20 +438,23 @@ static int build_options(nvme_host_t h, nvme_ctrl_t c, char **argstr) if (!transport) { nvme_msg(h->r, LOG_ERR, "need a transport (-t) argument\n"); - return -ENVME_CONNECT_TARG; + errno = ENVME_CONNECT_TARG; + return -1; } if (strncmp(transport, "loop", 4)) { if (!nvme_ctrl_get_traddr(c)) { nvme_msg(h->r, LOG_ERR, "need a address (-a) argument\n"); - return -ENVME_CONNECT_AARG; + errno = ENVME_CONNECT_AARG; + return -1; } } /* always specify nqn as first arg - this will init the string */ if (asprintf(argstr, "nqn=%s", nvme_ctrl_get_subsysnqn(c)) < 0) { - return -ENOMEM; + errno = ENOMEM; + return -1; } if (!strcmp(nvme_ctrl_get_subsysnqn(c), NVME_DISC_SUBSYS_NAME)) { nvme_ctrl_set_discovery_ctrl(c, true); |