[stgt] [PATCH 06/15] Fix "tgtadm --show" error handling
Arne Redlich
arne.redlich at googlemail.com
Tue Jun 9 18:22:12 CEST 2009
tgtadm error codes are > 0 but some functions might return negative results.
Signed-off-by: Arne Redlich <arne.redlich at googlemail.com>
---
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 at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
More information about the stgt
mailing list