[sheepdog] [PATCH] collie: print VIDs after various vdi operations

Liu Yuan namei.unix at gmail.com
Tue Jul 2 05:08:27 CEST 2013


On Tue, Jul 02, 2013 at 11:28:05AM +0900, Hitoshi Mitake wrote:
> Priting VIDs after various operations by "collie vdi" is useful both
> for human administrators and software which wraps collie.
> 
> Signed-off-by: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
> ---
>  collie/vdi.c |   43 ++++++++++++++++++++++++++++++++++++-------
>  1 file changed, 36 insertions(+), 7 deletions(-)
> 
> diff --git a/collie/vdi.c b/collie/vdi.c
> index 987be29..369315d 100644
> --- a/collie/vdi.c
> +++ b/collie/vdi.c
> @@ -609,6 +609,12 @@ static int vdi_create(int argc, char **argv)
>  	}
>  	show_progress(idx * SD_DATA_OBJ_SIZE, inode->vdi_size);
>  	ret = EXIT_SUCCESS;
> +
> +	if (raw_output)
> +		printf("%x\n", vid);
> +	else
> +		printf("VDI ID of newly created VDI: %x\n", vid);

No, raw_output is supposed to be parsed by applicatoin. Your patch will simply
break sheepfs.

I don't really see the point to printf message for these operations. If no error
returns, it means success.

Thanks,
Yuan



More information about the sheepdog mailing list