[Sheepdog] [PATCH] collie: don't read unused value from STDIN for vdi setattr -d

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Tue Jun 14 17:36:19 CEST 2011


At Mon, 13 Jun 2011 18:15:55 +0100,
Chris Webb wrote:
> 
> Signed-off-by: Chris Webb <chris at arachsys.com>
> ---
>  collie/collie.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Applied, thanks!

Kazutaka

> 
> diff --git a/collie/collie.c b/collie/collie.c
> index e0ecc78..606cb30 100644
> --- a/collie/collie.c
> +++ b/collie/collie.c
> @@ -900,7 +900,7 @@ static int vdi_setattr(int argc, char **argv)
>  	}
>  
>  	value = argv[optind++];
> -	if (!value) {
> +	if (!value && !vdi_cmd_data.delete) {
>  		value = malloc(SD_MAX_VDI_ATTR_VALUE_LEN);
>  		if (!value) {
>  			fprintf(stderr, "failed to allocate memory\n");
> -- 
> 1.7.4.1
> 
> -- 
> sheepdog mailing list
> sheepdog at lists.wpkg.org
> http://lists.wpkg.org/mailman/listinfo/sheepdog



More information about the sheepdog mailing list