mirror of
https://git.proxmox.com/git/qemu
synced 2025-08-06 17:31:06 +00:00
Revert "qdev: Add help for device properties"
This reverts commit 2ba6edf0dd
.
The commit has two issues:
* When it runs from the monitor, e.g. "device_add e1000,?", it prints
to stderr instead of the monitor.
* Help looks to callers just like failed device creation. This makes
main() exit unsuccessfully on "-device e1000,?".
We need to do this differently.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
eecbb9fe6f
commit
5137b6accd
@ -544,19 +544,8 @@ int qdev_prop_parse(DeviceState *dev, const char *name, const char *value)
|
|||||||
|
|
||||||
prop = qdev_prop_find(dev, name);
|
prop = qdev_prop_find(dev, name);
|
||||||
if (!prop) {
|
if (!prop) {
|
||||||
if (strcmp(name, "?") != 0) {
|
fprintf(stderr, "property \"%s.%s\" not found\n",
|
||||||
fprintf(stderr, "property \"%s.%s\" not found\n",
|
dev->info->name, name);
|
||||||
dev->info->name, name);
|
|
||||||
} else {
|
|
||||||
fprintf(stderr, "supported properties:\n");
|
|
||||||
if (dev->info->props != NULL) {
|
|
||||||
Property *props = dev->info->props;
|
|
||||||
while (props->name) {
|
|
||||||
fprintf(stderr, "%s.%s\n", dev->info->name, props->name);
|
|
||||||
props++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (!prop->info->parse) {
|
if (!prop->info->parse) {
|
||||||
|
Loading…
Reference in New Issue
Block a user