[sheepdog] [PATCH] dog: fix return value of vdi_backup()
Liu Yuan
namei.unix at gmail.com
Tue Oct 29 06:52:32 CET 2013
On Tue, Oct 29, 2013 at 02:35:09AM +0900, Ryusuke Konishi wrote:
> "dog vdi backup" command returns 16 as its status code even if it
> successfully ended.
>
> This is because the current vdi_backup function returns the byte count
> returned by the last xwrite call in the function.
>
> This fixes the issue by overwriting the return code with EXIT_SUCCESS
> at the end of the normal path of vdi_backup().
>
> Signed-off-by: Ryusuke Konishi <konishi.ryusuke at lab.ntt.co.jp>
> ---
> dog/vdi.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/dog/vdi.c b/dog/vdi.c
> index d829077..d9a9a0f 100644
> --- a/dog/vdi.c
> +++ b/dog/vdi.c
> @@ -1878,6 +1878,7 @@ static int vdi_backup(int argc, char **argv)
> }
>
> fsync(STDOUT_FILENO);
> + ret = EXIT_SUCCESS;
> out:
> free(from_inode);
> free(to_inode);
Applied thanks
Yuan
More information about the sheepdog
mailing list