mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-11-05 20:35:44 +00:00
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>
This commit is contained in:
parent
a414c306c0
commit
21c9f4cdc6
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue