Hi Mike,

iscsid is using a mixture of '1' or '-1' to signal a failure.
We should rather use '1' consistently.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                   zSeries & Storage
[EMAIL PROTECTED]                             +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Markus Rex, HRB 16746 (AG Nürnberg)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~----------~----~----~----~------~----~------~--~---

Cleanup error codes for iscsid

iscsid should use consistent error codes; we should always
return '1' on failure, not a mixture of '-1' and '1'.

Signed-off-by: Hannes Reinecke <[EMAIL PROTECTED]>

diff --git a/usr/iscsid.c b/usr/iscsid.c
index 6c1815a..bc280e8 100644
--- a/usr/iscsid.c
+++ b/usr/iscsid.c
@@ -409,7 +409,7 @@ int main(int argc, char *argv[])
 
        if ((mgmt_ipc_fd = mgmt_ipc_listen()) < 0) {
                log_close(log_pid);
-               exit(-1);
+               exit(1);
        }
 
        if (log_daemon) {
@@ -434,7 +434,7 @@ int main(int argc, char *argv[])
 
                if ((control_fd = ipc->ctldev_open()) < 0) {
                        log_close(log_pid);
-                       exit(-1);
+                       exit(1);
                }
 
                chdir("/");
@@ -451,7 +451,7 @@ int main(int argc, char *argv[])
        } else {
                if ((control_fd = ipc->ctldev_open()) < 0) {
                        log_close(log_pid);
-                       exit(-1);
+                       exit(1);
                }
        }
 

Reply via email to