Skip to content
Snippets Groups Projects
Commit 21c9f4cd authored by Gerd Hoffmann's avatar Gerd Hoffmann Committed by Anthony Liguori
Browse files

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: default avatarGerd Hoffmann <kraxel@redhat.com>
Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
parent a414c306
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment