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

FUJITA Tomonori fujita.tomonori at lab.ntt.co.jp
Fri Jun 12 04:35:48 CEST 2009


On Tue, 09 Jun 2009 18:21:48 +0200
Arne Redlich <arne.redlich at googlemail.com> wrote:

> 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

Merged, thanks!

We really need to clean up the error value handling (especially in
mgmt.c).
--
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