From 8212c64f0e1b32300b7ec4e79885a0caf6f521a6 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Wed, 10 Feb 2010 19:52:18 +0100 Subject: qemu-option: Move the implied first name into QemuOptsList We sometimes permit omitting the first option name, for example -device foo is short for -device driver=foo. The name to use ("driver" in the example) is passed as argument to qemu_opts_parse(). For each QemuOptsList, we use at most one such name. Move the name into QemuOptsList, and pass whether to permit the abbreviation. This ensures continued consistency, and simplifies the commit after next in this series. --- qemu-config.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'qemu-config.c') diff --git a/qemu-config.c b/qemu-config.c index ad130fb..a2e0193 100644 --- a/qemu-config.c +++ b/qemu-config.c @@ -86,6 +86,7 @@ QemuOptsList qemu_drive_opts = { QemuOptsList qemu_chardev_opts = { .name = "chardev", + .implied_opt_name = "backend", .head = QTAILQ_HEAD_INITIALIZER(qemu_chardev_opts.head), .desc = { { @@ -152,6 +153,7 @@ QemuOptsList qemu_chardev_opts = { QemuOptsList qemu_device_opts = { .name = "device", + .implied_opt_name = "driver", .head = QTAILQ_HEAD_INITIALIZER(qemu_device_opts.head), .desc = { /* @@ -165,6 +167,7 @@ QemuOptsList qemu_device_opts = { QemuOptsList qemu_netdev_opts = { .name = "netdev", + .implied_opt_name = "type", .head = QTAILQ_HEAD_INITIALIZER(qemu_netdev_opts.head), .desc = { /* @@ -177,6 +180,7 @@ QemuOptsList qemu_netdev_opts = { QemuOptsList qemu_net_opts = { .name = "net", + .implied_opt_name = "type", .head = QTAILQ_HEAD_INITIALIZER(qemu_net_opts.head), .desc = { /* @@ -227,6 +231,7 @@ QemuOptsList qemu_global_opts = { QemuOptsList qemu_mon_opts = { .name = "mon", + .implied_opt_name = "chardev", .head = QTAILQ_HEAD_INITIALIZER(qemu_mon_opts.head), .desc = { { -- cgit v1.1