提交 90ca64a9 编写于 作者: P Paolo Bonzini 提交者: Anthony Liguori

qdev: fix -device foo,?

Since most property types do not have a parse property now, this was
broken.  Fix it by looking at the setter instead.
Reviewed-by: NAnthony Liguori <aliguori@us.ibm.com>
Acked-by: NAndreas F=E4rber <afaerber@suse.de>
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 77f4c9a6
...@@ -158,7 +158,7 @@ int qdev_device_help(QemuOpts *opts) ...@@ -158,7 +158,7 @@ int qdev_device_help(QemuOpts *opts)
* for removal. This conditional should be removed along with * for removal. This conditional should be removed along with
* it. * it.
*/ */
if (!prop->info->parse) { if (!prop->info->set) {
continue; /* no way to set it, don't show */ continue; /* no way to set it, don't show */
} }
error_printf("%s.%s=%s\n", driver, prop->name, error_printf("%s.%s=%s\n", driver, prop->name,
...@@ -166,7 +166,7 @@ int qdev_device_help(QemuOpts *opts) ...@@ -166,7 +166,7 @@ int qdev_device_help(QemuOpts *opts)
} }
if (info->bus_info) { if (info->bus_info) {
for (prop = info->bus_info->props; prop && prop->name; prop++) { for (prop = info->bus_info->props; prop && prop->name; prop++) {
if (!prop->info->parse) { if (!prop->info->set) {
continue; /* no way to set it, don't show */ continue; /* no way to set it, don't show */
} }
error_printf("%s.%s=%s\n", driver, prop->name, error_printf("%s.%s=%s\n", driver, prop->name,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册