[stgt] [PATCH 01/15] Return correct error and len in response to invalid tgtadm requests

Arne Redlich arne.redlich at googlemail.com
Tue Jun 9 18:21:48 CEST 2009


Signed-off-by: Arne Redlich <arne.redlich at googlemail.com>
---
 usr/mgmt.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/usr/mgmt.c b/usr/mgmt.c
index 5332dc0..7fc5d29 100644
--- a/usr/mgmt.c
+++ b/usr/mgmt.c
@@ -359,6 +359,9 @@ static int tgt_mgmt(struct mgmt_task *mtask)
 							mtask->buf, len);
 
 			set_show_results(rsp, &err);
+		} else {
+			rsp->err = err;
+			rsp->len = sizeof(*rsp);
 		}
 		break;
 	}
-- 
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