qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [COMMIT 21c9f4c] qemu-option: fix parse_option_number().


From: Anthony Liguori
Subject: [Qemu-commits] [COMMIT 21c9f4c] qemu-option: fix parse_option_number().
Date: Mon, 10 Aug 2009 21:48:00 -0000

From: Gerd Hoffmann <address@hidden>

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 <address@hidden>
Signed-off-by: Gerd Hoffmann <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>

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;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]