From patchwork Wed Sep 23 10:24:08 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark McLoughlin X-Patchwork-Id: 34129 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 95D09B7B77 for ; Wed, 23 Sep 2009 20:42:09 +1000 (EST) Received: from localhost ([127.0.0.1]:54768 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MqPIT-0007af-Jh for incoming@patchwork.ozlabs.org; Wed, 23 Sep 2009 06:42:05 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MqP2s-0003mv-Nq for qemu-devel@nongnu.org; Wed, 23 Sep 2009 06:25:58 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MqP2i-0003gS-0x for qemu-devel@nongnu.org; Wed, 23 Sep 2009 06:25:52 -0400 Received: from [199.232.76.173] (port=37812 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MqP2g-0003fl-Mp for qemu-devel@nongnu.org; Wed, 23 Sep 2009 06:25:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:2433) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MqP2f-0001VP-Qh for qemu-devel@nongnu.org; Wed, 23 Sep 2009 06:25:46 -0400 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n8NAPicZ025952 for ; Wed, 23 Sep 2009 06:25:45 -0400 Received: from blaa.localdomain (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n8NAPhss012107; Wed, 23 Sep 2009 06:25:44 -0400 Received: by blaa.localdomain (Postfix, from userid 500) id 02E074743B; Wed, 23 Sep 2009 11:24:24 +0100 (IST) From: Mark McLoughlin To: qemu-devel@nongnu.org Date: Wed, 23 Sep 2009 11:24:08 +0100 Message-Id: <1253701463-3134-10-git-send-email-markmc@redhat.com> In-Reply-To: <1253701463-3134-1-git-send-email-markmc@redhat.com> References: <1253701463-3134-1-git-send-email-markmc@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.21 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: Mark McLoughlin Subject: [Qemu-devel] [PATCH 09/24] Remove double error message for -device option parsing X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org qemu_opts_parse() gives a suitable error message in all failure cases so we can remove the error message from the caller. Signed-off-by: Mark McLoughlin --- vl.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/vl.c b/vl.c index 4ebd242..0f2e2f6 100644 --- a/vl.c +++ b/vl.c @@ -5240,9 +5240,7 @@ int main(int argc, char **argv, char **envp) add_device_config(DEV_USB, optarg); break; case QEMU_OPTION_device: - opts = qemu_opts_parse(&qemu_device_opts, optarg, "driver"); - if (!opts) { - fprintf(stderr, "parse error: %s\n", optarg); + if (!qemu_opts_parse(&qemu_device_opts, optarg, "driver")) { exit(1); } break;