monitor: Use argument type 'O' for device_add
While there, improve the params help text.
This commit is contained in:
parent
361127dfb4
commit
c7e4e8ceb3
@ -766,8 +766,7 @@ void do_device_add(Monitor *mon, const QDict *qdict)
|
|||||||
{
|
{
|
||||||
QemuOpts *opts;
|
QemuOpts *opts;
|
||||||
|
|
||||||
opts = qemu_opts_parse(&qemu_device_opts,
|
opts = qemu_opts_from_qdict(&qemu_device_opts, qdict);
|
||||||
qdict_get_str(qdict, "config"), 1);
|
|
||||||
if (opts) {
|
if (opts) {
|
||||||
if (qdev_device_help(opts) || qdev_device_add(opts) == NULL) {
|
if (qdev_device_help(opts) || qdev_device_add(opts) == NULL) {
|
||||||
qemu_opts_del(opts);
|
qemu_opts_del(opts);
|
||||||
|
@ -570,8 +570,8 @@ ETEXI
|
|||||||
|
|
||||||
{
|
{
|
||||||
.name = "device_add",
|
.name = "device_add",
|
||||||
.args_type = "config:s",
|
.args_type = "device:O",
|
||||||
.params = "device",
|
.params = "driver[,prop=value][,...]",
|
||||||
.help = "add device, like -device on the command line",
|
.help = "add device, like -device on the command line",
|
||||||
.mhandler.cmd = do_device_add,
|
.mhandler.cmd = do_device_add,
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user