Skip to contentSkip to conversation

qemu-option: fix parse_option_number().

PATCH New Gerd Hoffmann 1 participant 1 message Jul 29, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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).

---
 qemu-option.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
qemu-option.c +1 -0
index 73c2175..591d178 100644
@@ -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;
Signature · 1 line
1.6.2.5