[Pkg-iscsi-maintainers] [open-iscsi] 24/33: Fix discovery error return without return value

Ritesh Raj Sarraf rrs at alioth.debian.org
Tue Nov 5 16:21:17 UTC 2013


This is an automated email from the git hooks/post-receive script.

rrs pushed a commit to branch upstream-mnc
in repository open-iscsi.

commit d9e26d3b94e0c7e874fedcf9cf578be7e9c8389b
Author: Lee Duncan <lduncan at suse.com>
Date:   Wed Jun 26 11:57:39 2013 -0700

    Fix discovery error return without return value
    
    openSUSE Build Service compiler noticed that one discovery
    error path did not have a return value, so an appropriate
    error is now being returned.
    
    Signed-of-by: Lee Duncan <lduncan at suse.com>
---
 include/iscsi_err.h |    2 ++
 usr/iscsiadm.c      |    1 +
 2 files changed, 3 insertions(+)

diff --git a/include/iscsi_err.h b/include/iscsi_err.h
index 1139133..125f443 100644
--- a/include/iscsi_err.h
+++ b/include/iscsi_err.h
@@ -64,6 +64,8 @@ enum {
 	ISCSI_ERR_BUSY			= 28,
 	/* Operation failed, but retrying layer may succeed */
 	ISCSI_ERR_AGAIN			= 29,
+	/* unknown discovery type */
+	ISCSI_ERR_UNKNOWN_DISCOVERY_TYPE = 30,
 
 	/* Always last. Indicates end of error code space */
 	ISCSI_MAX_ERR_VAL,
diff --git a/usr/iscsiadm.c b/usr/iscsiadm.c
index 84d5a27..5030894 100644
--- a/usr/iscsiadm.c
+++ b/usr/iscsiadm.c
@@ -1235,6 +1235,7 @@ sw_discovery:
 		return do_isns(drec, ifaces, info_level, do_login, op);
 	default:
 		log_debug(1, "Unknown Discovery Type : %d\n", drec->type);
+		return ISCSI_ERR_UNKNOWN_DISCOVERY_TYPE;
 	}
 }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-iscsi/open-iscsi.git



More information about the Pkg-iscsi-maintainers mailing list