mirror of
https://github.com/mii443/qemu.git
synced 2025-12-16 17:18:49 +00:00
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.
This commit is contained in:
@@ -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 = {
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user