qdev: print bus properties too

Make qdev_device_help print both device and bus properties.
Helps libvirt to figure whenever bus properties such as
PCI.multifunction are supported present or not.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
Gerd Hoffmann 2011-09-16 11:25:05 +02:00 committed by Anthony Liguori
parent 71579cae30
commit a8467c7a0e

View File

@ -207,6 +207,12 @@ int qdev_device_help(QemuOpts *opts)
}
error_printf("%s.%s=%s\n", info->name, prop->name, prop->info->name);
}
for (prop = info->bus_info->props; prop && prop->name; prop++) {
if (!prop->info->parse) {
continue; /* no way to set it, don't show */
}
error_printf("%s.%s=%s\n", info->name, prop->name, prop->info->name);
}
return 1;
}