From patchwork Wed Sep 23 10:24:12 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [13/24] Add qemu_net_opts Date: Wed, 23 Sep 2009 00:24:12 -0000 From: Mark McLoughlin X-Patchwork-Id: 34132 Message-Id: <1253701463-3134-14-git-send-email-markmc@redhat.com> 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 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);