From patchwork Thu Sep 10 15:18:50 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark McLoughlin X-Patchwork-Id: 33325 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 74D50B70AD for ; Fri, 11 Sep 2009 01:34:00 +1000 (EST) Received: from localhost ([127.0.0.1]:56976 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mllen-0000fE-NW for incoming@patchwork.ozlabs.org; Thu, 10 Sep 2009 11:33:57 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MllXy-0006GP-AL for qemu-devel@nongnu.org; Thu, 10 Sep 2009 11:26:54 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MllXq-0006Bq-GF for qemu-devel@nongnu.org; Thu, 10 Sep 2009 11:26:51 -0400 Received: from [199.232.76.173] (port=40171 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MllXq-0006Bd-B9 for qemu-devel@nongnu.org; Thu, 10 Sep 2009 11:26:46 -0400 Received: from mail10.svc.cra.dublin.eircom.net ([159.134.118.26]:33013) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1MllXp-000076-PZ for qemu-devel@nongnu.org; Thu, 10 Sep 2009 11:26:45 -0400 Received: (qmail 48707 messnum 12722916 invoked from network[83.71.108.236/83-71-108-236-dynamic.b-ras1.srl.dublin.eircom.net]); 10 Sep 2009 15:20:05 -0000 Received: from 83-71-108-236-dynamic.b-ras1.srl.dublin.eircom.net (HELO blaa.localdomain) (83.71.108.236) by mail10.svc.cra.dublin.eircom.net (qp 48707) with SMTP; 10 Sep 2009 15:20:05 -0000 Received: by blaa.localdomain (Postfix, from userid 500) id 9429A41AB7; Thu, 10 Sep 2009 16:19:01 +0100 (IST) From: Mark McLoughlin To: qemu-devel@nongnu.org Date: Thu, 10 Sep 2009 16:18:50 +0100 Message-Id: <1252595941-15196-9-git-send-email-markmc@redhat.com> X-Mailer: git-send-email 1.6.2.5 In-Reply-To: <1252595941-15196-1-git-send-email-markmc@redhat.com> References: <1252595941-15196-1-git-send-email-markmc@redhat.com> X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: Mark McLoughlin Subject: [Qemu-devel] [PATCH 08/19] Add qemu_net_opts 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 The first step in porting -net to QemuOpts. We do not include parameter descriptions in the QemuOptsList because we use the first parameter to choose which descriptions validate against. Signed-off-by: Mark McLoughlin --- qemu-config.c | 13 +++++++++++++ qemu-config.h | 1 + 2 files changed, 14 insertions(+), 0 deletions(-) diff --git a/qemu-config.c b/qemu-config.c index 733cc24..275de4f 100644 --- a/qemu-config.c +++ b/qemu-config.c @@ -151,10 +151,23 @@ QemuOptsList qemu_device_opts = { }, }; +QemuOptsList qemu_net_opts = { + .name = "net", + .head = TAILQ_HEAD_INITIALIZER(qemu_net_opts.head), + .desc = { + /* + * no elements => accept any params + * validation will happen later + */ + { /* end if list */ } + }, +}; + static QemuOptsList *lists[] = { &qemu_drive_opts, &qemu_chardev_opts, &qemu_device_opts, + &qemu_net_opts, NULL, }; diff --git a/qemu-config.h b/qemu-config.h index 13b0f19..852fe52 100644 --- a/qemu-config.h +++ b/qemu-config.h @@ -4,6 +4,7 @@ extern QemuOptsList qemu_drive_opts; extern QemuOptsList qemu_chardev_opts; extern QemuOptsList qemu_device_opts; +extern QemuOptsList qemu_net_opts; int qemu_set_option(const char *str);