From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MW4hs-0004Zt-8F for qemu-devel@nongnu.org; Wed, 29 Jul 2009 04:40:16 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MW4hn-0004YX-3d for qemu-devel@nongnu.org; Wed, 29 Jul 2009 04:40:15 -0400 Received: from [199.232.76.173] (port=34297 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MW4hm-0004YS-Jr for qemu-devel@nongnu.org; Wed, 29 Jul 2009 04:40:10 -0400 Received: from mx20.gnu.org ([199.232.41.8]:47730) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MW4hm-00067b-5l for qemu-devel@nongnu.org; Wed, 29 Jul 2009 04:40:10 -0400 Received: from mx2.redhat.com ([66.187.237.31]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MW4hl-0002dR-2V for qemu-devel@nongnu.org; Wed, 29 Jul 2009 04:40:09 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n6T8e5uc007524 for ; Wed, 29 Jul 2009 04:40:05 -0400 From: Gerd Hoffmann Date: Wed, 29 Jul 2009 10:39:59 +0200 Message-Id: <1248856799-21378-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH] qemu-option: fix parse_option_number(). List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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 Signed-off-by: Gerd Hoffmann --- 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