[PATCH 06/15] Fix "tgtadm --show" error handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tgtadm error codes are > 0 but some functions might return negative results.

Signed-off-by: Arne Redlich <arne.redlich@xxxxxxxxxxxxxx>
---
 usr/mgmt.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/usr/mgmt.c b/usr/mgmt.c
index 7fc5d29..7801ab0 100644
--- a/usr/mgmt.c
+++ b/usr/mgmt.c
@@ -63,7 +63,7 @@ static int ipc_fd;
 static void set_show_results(struct tgtadm_rsp *rsp, int *err)
 {
 	if (*err < 0)
-		rsp->err = *err;
+		rsp->err = -*err;
 	else {
 		rsp->err = 0;
 		rsp->len = *err + sizeof(*rsp);
-- 
1.6.0.4



--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux