79c4324644
Change-Id: I2d302dda68298877c65c99147f5bf22186a59aac
53 lines
1.6 KiB
Diff
53 lines
1.6 KiB
Diff
From 3860a3a40673bdbcf8f8fde9017e9e1ecbd82b36 Mon Sep 17 00:00:00 2001
|
|
From: boringandboring <wangjinlei_yewu@cmss.chinamobile.com>
|
|
Date: Mon, 27 Nov 2023 16:09:24 +0800
|
|
Subject: [PATCH] hmp: Improve sync-profile error message
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
cherry picked from 7200fb211ef306c36d5e9060263b2a4d2f6d4700
|
|
|
|
Improve
|
|
|
|
(qemu) sync-profile of
|
|
Error: Invalid parameter 'of'
|
|
|
|
to
|
|
|
|
Error: invalid parameter 'of', expecting 'on', 'off', or 'reset'
|
|
|
|
Signed-off-by: Markus Armbruster <armbru@redhat.com>
|
|
Message-ID: <20231031111059.3407803-3-armbru@redhat.com>
|
|
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
|
|
Reviewed-by: Dr. David Alan Gilbert <dave@treblig.org>
|
|
---
|
|
monitor/hmp-cmds.c | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c
|
|
index 9570011232..5246c82e14 100644
|
|
--- a/monitor/hmp-cmds.c
|
|
+++ b/monitor/hmp-cmds.c
|
|
@@ -46,7 +46,6 @@
|
|
#include "qapi/qapi-visit-migration.h"
|
|
#include "qapi/qmp/qdict.h"
|
|
#include "qapi/qapi-visit-migration.h"
|
|
-#include "qapi/qmp/qerror.h"
|
|
#include "qapi/string-input-visitor.h"
|
|
#include "qapi/string-output-visitor.h"
|
|
#include "qom/object_interfaces.h"
|
|
@@ -920,7 +919,8 @@ void hmp_sync_profile(Monitor *mon, const QDict *qdict)
|
|
} else {
|
|
Error *err = NULL;
|
|
|
|
- error_setg(&err, QERR_INVALID_PARAMETER, op);
|
|
+ error_setg(&err, "invalid parameter '%s',"
|
|
+ " expecting 'on', 'off', or 'reset'", op);
|
|
hmp_handle_error(mon, err);
|
|
}
|
|
}
|
|
--
|
|
2.27.0
|
|
|