From patchwork Wed Sep 23 10:24:12 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark McLoughlin X-Patchwork-Id: 34132 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 22965B7B7A for ; Wed, 23 Sep 2009 20:54:01 +1000 (EST) Received: from localhost ([127.0.0.1]:49301 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MqPTy-0006P4-8B for incoming@patchwork.ozlabs.org; Wed, 23 Sep 2009 06:53:58 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MqP2s-0003nD-AK 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-0003gg-4B for qemu-devel@nongnu.org; Wed, 23 Sep 2009 06:25:52 -0400 Received: from [199.232.76.173] (port=37809 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MqP2g-0003fi-Kl for qemu-devel@nongnu.org; Wed, 23 Sep 2009 06:25:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:26523) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MqP2f-0001VB-NC for qemu-devel@nongnu.org; Wed, 23 Sep 2009 06:25:46 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n8NAPitB020466 for ; Wed, 23 Sep 2009 06:25:44 -0400 Received: from blaa.localdomain (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n8NAPhtb011618; Wed, 23 Sep 2009 06:25:44 -0400 Received: by blaa.localdomain (Postfix, from userid 500) id 267F74743F; Wed, 23 Sep 2009 11:24:24 +0100 (IST) From: Mark McLoughlin To: qemu-devel@nongnu.org Date: Wed, 23 Sep 2009 11:24:12 +0100 Message-Id: <1253701463-3134-14-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.12 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: Mark McLoughlin Subject: [Qemu-devel] [PATCH 13/24] 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 31e7d61..cf4aee8 100644 --- a/qemu-config.c +++ b/qemu-config.c @@ -151,10 +151,23 @@ QemuOptsList qemu_device_opts = { }, }; +QemuOptsList qemu_net_opts = { + .name = "net", + .head = QTAILQ_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);