From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mv8RI-0006Lv-Cq for qemu-devel@nongnu.org; Tue, 06 Oct 2009 07:42:44 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mv8RD-0006Hx-C7 for qemu-devel@nongnu.org; Tue, 06 Oct 2009 07:42:43 -0400 Received: from [199.232.76.173] (port=52593 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mv8RB-0006HV-RQ for qemu-devel@nongnu.org; Tue, 06 Oct 2009 07:42:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44511) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mv8RB-00031J-7v for qemu-devel@nongnu.org; Tue, 06 Oct 2009 07:42:37 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n96BIrTZ012416 for ; Tue, 6 Oct 2009 07:18:53 -0400 From: Mark McLoughlin Date: Tue, 6 Oct 2009 12:17:05 +0100 Message-Id: <1254827836-11021-16-git-send-email-markmc@redhat.com> In-Reply-To: <1254827783.2720.42.camel@blaa> References: <1254827783.2720.42.camel@blaa> Subject: [Qemu-devel] [PATCH] Add qemu_net_opts List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Mark McLoughlin 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 f5c1a12..bafaea2 100644 --- a/qemu-config.c +++ b/qemu-config.c @@ -152,6 +152,18 @@ 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 of list */ } + }, +}; + QemuOptsList qemu_rtc_opts = { .name = "rtc", .head = QTAILQ_HEAD_INITIALIZER(qemu_rtc_opts.head), @@ -176,6 +188,7 @@ static QemuOptsList *lists[] = { &qemu_drive_opts, &qemu_chardev_opts, &qemu_device_opts, + &qemu_net_opts, &qemu_rtc_opts, NULL, }; diff --git a/qemu-config.h b/qemu-config.h index 4ae7b74..cdad5ac 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; extern QemuOptsList qemu_rtc_opts; int qemu_set_option(const char *str); -- 1.6.2.5