提交 c7e4e8ce 编写于 作者: M Markus Armbruster

monitor: Use argument type 'O' for device_add

While there, improve the params help text.
上级 361127df
......@@ -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);
......
......@@ -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,
},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册