aboutsummaryrefslogtreecommitdiff
path: root/qemu-config.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2012-06-25 14:36:33 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2012-11-16 08:36:12 -0600
commit68d98d3e42b2b291274537d1ae4092e11d321437 (patch)
tree6bfce1beea572098f24c85b5e9f023a7ebc18df4 /qemu-config.c
parent6801038bc52d61f81ac8a25fbe392f1bad982887 (diff)
vl: add -object option to create QOM objects from the command line
This will create a new QOM object in the '/objects' path. Note that properties are set in order which allows for simple objects to be initialized entirely with this option and then realized. This option is roughly equivalent to -device but for things that are not devices. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'qemu-config.c')
-rw-r--r--qemu-config.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/qemu-config.c b/qemu-config.c
index 3154cac10f..10d1ba4176 100644
--- a/qemu-config.c
+++ b/qemu-config.c
@@ -682,6 +682,15 @@ static QemuOptsList qemu_add_fd_opts = {
},
};
+static QemuOptsList qemu_object_opts = {
+ .name = "object",
+ .implied_opt_name = "qom-type",
+ .head = QTAILQ_HEAD_INITIALIZER(qemu_object_opts.head),
+ .desc = {
+ { }
+ },
+};
+
static QemuOptsList *vm_config_groups[32] = {
&qemu_drive_opts,
&qemu_chardev_opts,
@@ -699,6 +708,7 @@ static QemuOptsList *vm_config_groups[32] = {
&qemu_iscsi_opts,
&qemu_sandbox_opts,
&qemu_add_fd_opts,
+ &qemu_object_opts,
NULL,
};