aboutsummaryrefslogtreecommitdiffstats
path: root/qemu-option.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2009-07-29 10:39:59 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-07-30 09:50:37 -0500
commit21c9f4cdc63f4ab85f7271b5d6de999ad74d4488 (patch)
tree0c4e0c46eea1ee91a69ceb671d705159edd8253b /qemu-option.c
parenta414c306c06c4ee9cb05af645b9fee6f8ea34038 (diff)
qemu-option: fix parse_option_number().
It works much better when parse_option_number actually returns the number parsed ... Common breakage resulting from this bug is that 'qemu -hda foo.img -cdrom bar.iso' stops working (cdrom isn't there). Cc: Avi Kivity <avi@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'qemu-option.c')
-rw-r--r--qemu-option.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/qemu-option.c b/qemu-option.c
index 73c217549..591d17899 100644
--- a/qemu-option.c
+++ b/qemu-option.c
@@ -193,6 +193,7 @@ static int parse_option_number(const char *name, const char *value, uint64_t *re
fprintf(stderr, "Option '%s' needs a number as parameter\n", name);
return -1;
}
+ *ret = number;
} else {
fprintf(stderr, "Option '%s' needs a parameter\n", name);
return -1;