[sheepdog] [PATCH] dog: fix return value of vdi_backup()
Ryusuke Konishi
konishi.ryusuke at lab.ntt.co.jp
Mon Oct 28 18:35:09 CET 2013
"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);
--
1.7.9.3
More information about the sheepdog
mailing list