qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] qemu-option: fix parse_option_number().
@ 2009-07-29  8:39 Gerd Hoffmann
  0 siblings, 0 replies; only message in thread
From: Gerd Hoffmann @ 2009-07-29  8:39 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann, Avi Kivity

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>
---
 qemu-option.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/qemu-option.c b/qemu-option.c
index 73c2175..591d178 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;
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-07-29  8:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-29  8:39 [Qemu-devel] [PATCH] qemu-option: fix parse_option_number() Gerd Hoffmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).