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>
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;