From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>, Avi Kivity <avi@redhat.com>
Subject: [Qemu-devel] [PATCH] qemu-option: fix parse_option_number().
Date: Wed, 29 Jul 2009 10:39:59 +0200 [thread overview]
Message-ID: <1248856799-21378-1-git-send-email-kraxel@redhat.com> (raw)
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
reply other threads:[~2009-07-29 8:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1248856799-21378-1-git-send-email-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=avi@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).