qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH V18 05/25] qemu-option: opt->str store digit, withou


From: Dong Xu Wang
Subject: [Qemu-devel] [PATCH V18 05/25] qemu-option: opt->str store digit, without suffixes
Date: Tue, 13 Aug 2013 12:31:46 +0800

To produce same output while using "qemu-img create", opt->str
should store pure digit, without suffixes.

Signed-off-by: Dong Xu Wang <address@hidden>
---
 util/qemu-option.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/util/qemu-option.c b/util/qemu-option.c
index b939e8a..861929d 100644
--- a/util/qemu-option.c
+++ b/util/qemu-option.c
@@ -675,6 +675,8 @@ static void qemu_opt_parse(QemuOpt *opt, Error **errp)
         break;
     case QEMU_OPT_SIZE:
         parse_option_size(opt->name, opt->str, &opt->value.uint, errp);
+        g_free((char *)opt->str);
+        opt->str = g_strdup(stringify(opt->value_uint));
         break;
     default:
         abort();
-- 
1.7.11.7




reply via email to

[Prev in Thread] Current Thread [Next in Thread]