[Sheepdog] [PATCH] sheepdog: parse the snapshot id as a decimal number

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Tue May 11 12:35:08 CEST 2010


It is better to parse the snapshot id as a decimal number because qemu
shows a snapshot list with snapshot id in decimal.

Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
 block/sheepdog.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/block/sheepdog.c b/block/sheepdog.c
index 5ca4dbb..eff4cb9 100644
--- a/block/sheepdog.c
+++ b/block/sheepdog.c
@@ -863,7 +863,7 @@ static int parse_vdiname(struct bdrv_sd_state *s, const char *filename,
 	p = strchr(vdi, ':');
 	if (p) {
 		*p++ = '\0';
-		*snapid = strtol(p, NULL, 16);
+		*snapid = strtol(p, NULL, 10);
 	} else
 		*snapid = CURRENT_VDI_ID; /* search current vdi */
 
-- 
1.5.6.5




More information about the sheepdog mailing list