QemuOpts: make most qemu_*_opts static

Switch tree to lookup-by-name using qemu_find_opts().
Also hook up virtfs options so qemu_find_opts works for them too.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
Gerd Hoffmann 2010-08-20 13:52:01 +02:00 committed by Anthony Liguori
parent dfe795e71f
commit 3329f07b7a
13 changed files with 59 additions and 66 deletions

View file

@ -5,7 +5,7 @@
#include "sysemu.h"
#include "hw/qdev.h"
QemuOptsList qemu_drive_opts = {
static QemuOptsList qemu_drive_opts = {
.name = "drive",
.head = QTAILQ_HEAD_INITIALIZER(qemu_drive_opts.head),
.desc = {
@ -84,7 +84,7 @@ QemuOptsList qemu_drive_opts = {
},
};
QemuOptsList qemu_chardev_opts = {
static QemuOptsList qemu_chardev_opts = {
.name = "chardev",
.implied_opt_name = "backend",
.head = QTAILQ_HEAD_INITIALIZER(qemu_chardev_opts.head),
@ -151,7 +151,6 @@ QemuOptsList qemu_chardev_opts = {
},
};
#ifdef CONFIG_LINUX
QemuOptsList qemu_fsdev_opts = {
.name = "fsdev",
.implied_opt_name = "fstype",
@ -170,9 +169,7 @@ QemuOptsList qemu_fsdev_opts = {
{ /*End of list */ }
},
};
#endif
#ifdef CONFIG_LINUX
QemuOptsList qemu_virtfs_opts = {
.name = "virtfs",
.implied_opt_name = "fstype",
@ -195,9 +192,8 @@ QemuOptsList qemu_virtfs_opts = {
{ /*End of list */ }
},
};
#endif
QemuOptsList qemu_device_opts = {
static QemuOptsList qemu_device_opts = {
.name = "device",
.implied_opt_name = "driver",
.head = QTAILQ_HEAD_INITIALIZER(qemu_device_opts.head),
@ -211,7 +207,7 @@ QemuOptsList qemu_device_opts = {
},
};
QemuOptsList qemu_netdev_opts = {
static QemuOptsList qemu_netdev_opts = {
.name = "netdev",
.implied_opt_name = "type",
.head = QTAILQ_HEAD_INITIALIZER(qemu_netdev_opts.head),
@ -224,7 +220,7 @@ QemuOptsList qemu_netdev_opts = {
},
};
QemuOptsList qemu_net_opts = {
static QemuOptsList qemu_net_opts = {
.name = "net",
.implied_opt_name = "type",
.head = QTAILQ_HEAD_INITIALIZER(qemu_net_opts.head),
@ -237,7 +233,7 @@ QemuOptsList qemu_net_opts = {
},
};
QemuOptsList qemu_rtc_opts = {
static QemuOptsList qemu_rtc_opts = {
.name = "rtc",
.head = QTAILQ_HEAD_INITIALIZER(qemu_rtc_opts.head),
.desc = {
@ -255,7 +251,7 @@ QemuOptsList qemu_rtc_opts = {
},
};
QemuOptsList qemu_global_opts = {
static QemuOptsList qemu_global_opts = {
.name = "global",
.head = QTAILQ_HEAD_INITIALIZER(qemu_global_opts.head),
.desc = {
@ -273,7 +269,7 @@ QemuOptsList qemu_global_opts = {
},
};
QemuOptsList qemu_mon_opts = {
static QemuOptsList qemu_mon_opts = {
.name = "mon",
.implied_opt_name = "chardev",
.head = QTAILQ_HEAD_INITIALIZER(qemu_mon_opts.head),
@ -292,7 +288,7 @@ QemuOptsList qemu_mon_opts = {
},
};
QemuOptsList qemu_cpudef_opts = {
static QemuOptsList qemu_cpudef_opts = {
.name = "cpudef",
.head = QTAILQ_HEAD_INITIALIZER(qemu_cpudef_opts.head),
.desc = {