]> git.proxmox.com Git - mirror_qemu.git/commitdiff
machine: Fix replacement of '_' by '-' in machine property names
authorMarkus Armbruster <armbru@redhat.com>
Thu, 13 Oct 2016 16:44:14 +0000 (18:44 +0200)
committerEduardo Habkost <ehabkost@redhat.com>
Mon, 17 Oct 2016 17:48:40 +0000 (15:48 -0200)
machine_set_property() replaces '_' by '-' in the property name.
Except it fails to replace an initial '_'.  Screwed up in commit
b0ddb8b.  Reproducer: "-M pc,__foo_bar=true" produces "Property
'._-foo-bar' not found".

Error messages using a mangled name rather than the name the user
actually wrote is user-hostile, but that's a different topic.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>

No differences found