Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Step:FrontRunner
libnvme.26914
0021-fabrics-Fix-build_options-return-values.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0021-fabrics-Fix-build_options-return-values.patch of Package libnvme.26914
From: Tomas Bzatek <tbzatek@redhat.com> Date: Thu, 28 Jul 2022 18:41:15 +0200 Subject: fabrics: Fix build_options() return values Git-commit: 1e472ed053ee100fb9b574a8fc6848d10128cc66 References: git-fixes Make the returned error values consistent with the rest of the code. Acked-by: Daniel Wagner <dwagner@suse.de> --- src/nvme/fabrics.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) --- a/src/nvme/fabrics.c +++ b/src/nvme/fabrics.c @@ -422,20 +422,23 @@ static int build_options(nvme_host_t h, 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);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor