Commit 21c9f4cdc63f4ab85f7271b5d6de999ad74d4488
Committed by
Anthony Liguori
1 parent
a414c306
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>
Showing
1 changed file
with
1 additions
and
0 deletions
qemu-option.c
| ... | ... | @@ -193,6 +193,7 @@ static int parse_option_number(const char *name, const char *value, uint64_t *re |
| 193 | 193 | fprintf(stderr, "Option '%s' needs a number as parameter\n", name); |
| 194 | 194 | return -1; |
| 195 | 195 | } |
| 196 | + *ret = number; | |
| 196 | 197 | } else { |
| 197 | 198 | fprintf(stderr, "Option '%s' needs a parameter\n", name); |
| 198 | 199 | return -1; | ... | ... |