monitor: Use argument type 'O' for device_add
authorMarkus Armbruster <armbru@redhat.com>
Wed, 10 Feb 2010 19:47:28 +0000 (20:47 +0100)
committerMarkus Armbruster <armbru@redhat.com>
Tue, 16 Mar 2010 16:45:35 +0000 (17:45 +0100)
While there, improve the params help text.

hw/qdev.c
qemu-monitor.hx

index 64cabd55a270642953afd58961c27bc0995df721..a28e2623e9fa895610f76e0deca09e805b79e861 100644 (file)
--- a/hw/qdev.c
+++ b/hw/qdev.c
@@ -766,8 +766,7 @@ void do_device_add(Monitor *mon, const QDict *qdict)
 {
     QemuOpts *opts;
 
-    opts = qemu_opts_parse(&qemu_device_opts,
-                           qdict_get_str(qdict, "config"), 1);
+    opts = qemu_opts_from_qdict(&qemu_device_opts, qdict);
     if (opts) {
         if (qdev_device_help(opts) || qdev_device_add(opts) == NULL) {
             qemu_opts_del(opts);
index 7f9d261cd9ad721728e1945738adb8f8a03fba0f..45e5fd10f3abb975fe988b6bdd27292706d4153a 100644 (file)
@@ -570,8 +570,8 @@ ETEXI
 
     {
         .name       = "device_add",
-        .args_type  = "config:s",
-        .params     = "device",
+        .args_type  = "device:O",
+        .params     = "driver[,prop=value][,...]",
         .help       = "add device, like -device on the command line",
         .mhandler.cmd = do_device_add,
     },