Zero @length is rejected with "Invalid parameter 'length'". Improve
to "Parameter 'length' expects a non-zero length".
@protocol values not starting with "fd:" or "file:" are rejected with
"Invalid parameter 'protocol'". Improve to "parameter 'protocol' must
start with 'file:' or 'fd:'".
While there, make the conditional checking @protocol a little more
obvious.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
dump/dump.c | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/dump/dump.c b/dump/dump.c
index a5e9a06ef1..d888e4bd3c 100644
--- a/dump/dump.c
+++ b/dump/dump.c
@@ -1812,7 +1812,8 @@ static void dump_init(DumpState *s, int fd, bool
has_format,
s->fd = fd;
if (has_filter && !length) {
- error_setg(errp, QERR_INVALID_PARAMETER, "length");
+ error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "length",