machine: Fix replacement of '_' by '-' in machine property names
machine_set_property() replaces '_' by '-' in the property name. Except it fails to replace an initial '_'. Screwed up in commit b0ddb8bf. 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: NMarkus Armbruster <armbru@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com> Reviewed-by: NEduardo Habkost <ehabkost@redhat.com> Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
Showing
想要评论请 注册 或 登录