|
|
6c64be |
From f0d81b5ea1170274c57be7ee7989dc7bb0b64b84 Mon Sep 17 00:00:00 2001
|
|
|
6c64be |
From: Lee Duncan <lduncan@suse.com>
|
|
|
6c64be |
Date: Wed, 26 Jun 2013 11:57:39 -0700
|
|
|
6c64be |
Subject: Fix discovery error return without return value
|
|
|
6c64be |
|
|
|
6c64be |
openSUSE Build Service compiler noticed that one discovery
|
|
|
6c64be |
error path did not have a return value, so an appropriate
|
|
|
6c64be |
error is now being returned.
|
|
|
6c64be |
|
|
|
6c64be |
Signed-of-by: Lee Duncan <lduncan@suse.com>
|
|
|
6c64be |
---
|
|
|
6c64be |
include/iscsi_err.h | 2 ++
|
|
|
6c64be |
usr/iscsiadm.c | 1 +
|
|
|
6c64be |
2 files changed, 3 insertions(+)
|
|
|
6c64be |
|
|
|
6c64be |
diff --git a/include/iscsi_err.h b/include/iscsi_err.h
|
|
|
6c64be |
index 1139133..125f443 100644
|
|
|
6c64be |
--- a/include/iscsi_err.h
|
|
|
6c64be |
+++ b/include/iscsi_err.h
|
|
|
6c64be |
@@ -64,6 +64,8 @@ enum {
|
|
|
6c64be |
ISCSI_ERR_BUSY = 28,
|
|
|
6c64be |
/* Operation failed, but retrying layer may succeed */
|
|
|
6c64be |
ISCSI_ERR_AGAIN = 29,
|
|
|
6c64be |
+ /* unknown discovery type */
|
|
|
6c64be |
+ ISCSI_ERR_UNKNOWN_DISCOVERY_TYPE = 30,
|
|
|
6c64be |
|
|
|
6c64be |
/* Always last. Indicates end of error code space */
|
|
|
6c64be |
ISCSI_MAX_ERR_VAL,
|
|
|
6c64be |
diff --git a/usr/iscsiadm.c b/usr/iscsiadm.c
|
|
|
6c64be |
index 84d5a27..5030894 100644
|
|
|
6c64be |
--- a/usr/iscsiadm.c
|
|
|
6c64be |
+++ b/usr/iscsiadm.c
|
|
|
6c64be |
@@ -1235,6 +1235,7 @@ sw_discovery:
|
|
|
6c64be |
return do_isns(drec, ifaces, info_level, do_login, op);
|
|
|
6c64be |
default:
|
|
|
6c64be |
log_debug(1, "Unknown Discovery Type : %d\n", drec->type);
|
|
|
6c64be |
+ return ISCSI_ERR_UNKNOWN_DISCOVERY_TYPE;
|
|
|
6c64be |
}
|
|
|
6c64be |
}
|
|
|
6c64be |
|
|
|
6c64be |
--
|
|
|
6c64be |
1.8.1.4
|
|
|
6c64be |
|