diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-08-15 12:26:24 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-08-15 12:26:24 +0000 |
commit | 4864ced5614f5954f5bcab95e897da9b6824d931 (patch) | |
tree | 34f3dbb5bf63c8d3f2e95640aab82eebcbf48b92 /src/nvme/fabrics.c | |
parent | Adding upstream version 1.1~rc0. (diff) | |
download | libnvme-4864ced5614f5954f5bcab95e897da9b6824d931.tar.xz libnvme-4864ced5614f5954f5bcab95e897da9b6824d931.zip |
Adding upstream version 1.1.upstream/1.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/nvme/fabrics.c')
-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); |