qapi: Improve input_type_enum()'s error message
authorMarkus Armbruster <armbru@redhat.com>
Wed, 20 Oct 2021 18:02:31 +0000 (20:02 +0200)
committerMarkus Armbruster <armbru@redhat.com>
Wed, 27 Oct 2021 15:17:28 +0000 (17:17 +0200)
commitea29331ba6c0e622e63424cc8495177ed7655a77
tree785c14b3d103710340480e29b2a70ad90025617a
parent931ce30859176f0f7daac6bac255dae5eb21284e
qapi: Improve input_type_enum()'s error message

The error message claims the parameter is invalid:

    $ qemu-system-x86_64 -object qom-type=nonexistent
    qemu-system-x86_64: -object qom-type=nonexistent: Invalid parameter 'nonexistent'

What's wrong is actually the *value* 'nonexistent'.  Improve the
message to

    qemu-system-x86_64: -object qom-type=nonexistent: Parameter 'qom-type' does not accept value 'nonexistent'

Fixes: https://gitlab.com/qemu-project/qemu/-/issues/608
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20211020180231.434071-1-armbru@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
qapi/qapi-visit-core.c
tests/qemu-iotests/049.out
tests/qemu-iotests/206.out
tests/qemu-iotests/237.out
tests/qemu-iotests/245
tests/qemu-iotests/287
tests/qemu-iotests/308
tests/unit/check-qom-proplist.c