From patchwork Thu Mar 4 15:57:10 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [49/50] monitor: Use argument type 'O' for device_add Date: Thu, 04 Mar 2010 05:57:10 -0000 From: Markus Armbruster X-Patchwork-Id: 46943 Message-Id: <1267718231-13303-50-git-send-email-armbru@redhat.com> To: qemu-devel@nongnu.org Cc: Luiz Capitulino While there, improve the params help text. Signed-off-by: Markus Armbruster --- hw/qdev.c | 3 +-- qemu-monitor.hx | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/qdev.c b/hw/qdev.c index 1edfce8..241f204 100644 --- 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); diff --git a/qemu-monitor.hx b/qemu-monitor.hx index 7f9d261..45e5fd1 100644 --- a/qemu-monitor.hx +++ b/qemu-monitor.hx @@ -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, },