[Pkg-iscsi-maintainers] [open-iscsi] 38/48: iscsiadm: Fix the hostno check for stats submode of host mode

Ritesh Raj Sarraf rrs at moszumanska.debian.org
Wed Aug 20 13:54:13 UTC 2014


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 f2ecc22d3cb0473b117a33e048a5a56cd8e9e46d
Author: Chris Leech <cleech at redhat.com>
Date:   Mon Feb 24 03:14:17 2014 -0500

    iscsiadm: Fix the hostno check for stats submode of host mode
    
    This fixes the condition where hostno value of 0 was being treated
    as invalid.
    
    Signed-off-by: Chris Leech <cleech at redhat.com>
    Signed-off-by: Adheer Chandravanshi <adheer.chandravanshi at qlogic.com>
---
 usr/iscsiadm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/usr/iscsiadm.c b/usr/iscsiadm.c
index 3cde8d1..36617ab 100644
--- a/usr/iscsiadm.c
+++ b/usr/iscsiadm.c
@@ -3470,7 +3470,7 @@ main(int argc, char **argv)
 						       &params);
 				break;
 			case MODE_HOST_STATS:
-				if (!host_no) {
+				if (host_no > MAX_HOST_NO) {
 					log_error("STATS mode requires host no");
 					rc = ISCSI_ERR_INVAL;
 					break;

-- 
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