summaryrefslogtreecommitdiff
path: root/qemu-config.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2010-02-10 19:52:18 +0100
committerMarkus Armbruster <armbru@redhat.com>2010-03-16 17:45:34 +0100
commit8212c64f0e1b32300b7ec4e79885a0caf6f521a6 (patch)
tree2faf279be4942f2c30b535f508cf51ee88a82844 /qemu-config.c
parent01e7f18869c9ee4c84793f4a39ec1f5f4128a0aa (diff)
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.
Diffstat (limited to 'qemu-config.c')
-rw-r--r--qemu-config.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/qemu-config.c b/qemu-config.c
index ad130fbebe..a2e0193c1d 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 = {
{