oid is of uint64_t type, VDI object oid is started with 0x80, which is large than the maximum of long long int. So, we should replace strtoll with strtoull in function vdi_parser().
Signed-off-by: Bingpeng Zhu <bingpeng....@alibaba-inc.com> --- dog/vdi.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dog/vdi.c b/dog/vdi.c index 9230715..32b3e57 100644 --- a/dog/vdi.c +++ b/dog/vdi.c @@ -3021,7 +3021,7 @@ static int vdi_parser(int ch, const char *opt) vdi_cmd_data.store_policy = 1; break; case 'o': - vdi_cmd_data.oid = strtoll(opt, &p, 16); + vdi_cmd_data.oid = strtoull(opt, &p, 16); if (opt == p) { sd_err("object id must be a hex integer"); exit(EXIT_FAILURE); -- 1.7.1 -- sheepdog mailing list sheepdog@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/sheepdog