Missing argument returns a corresponding error message for all types

The "old" qmp dispatch code didn't return QERR_MISSING_PARAMETER for
argument structure members (it returned QERR_INVALID_PARAMETER). Only
for top-level argument it did return QERR_MISSING_PARAMETER. It is
preferable to have a consistent error for missing fields in inner
structs as well.

Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com>
Reviewed-by: Alberto Garcia <be...@igalia.com>
 tests/qemu-iotests/087.out | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/qemu-iotests/087.out b/tests/qemu-iotests/087.out
index a95c4b0..b213db2 100644
--- a/tests/qemu-iotests/087.out
+++ b/tests/qemu-iotests/087.out
@@ -60,7 +60,7 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 
 Testing: -S
 {"return": {}}
-{"error": {"class": "GenericError", "desc": "Invalid parameter type for 
'driver', expected: string"}}
+{"error": {"class": "GenericError", "desc": "Parameter 'driver' is missing"}}
 {"return": {}}
 {"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": 

Reply via email to