Avoid extra error for do_cpu_set()
cover Avoid extra error for do_cpu_set()
The conversion created a special error, to avoid changing the error message in the human monitor. Anthony thinks that's not necessary. Remove it and use a suitable generic error instead.
Markus Armbruster (2):
monitor: Use QERR_INVALID_PARAMETER instead of QERR_INVALID_CPU_INDEX Revert "QError: New QERR_INVALID_CPU_INDEX"
monitor.c | 2 +- qerror.c | 4 ---- qerror.h | 3 --- 3 files changed, 1 insertions(+), 8 deletions(-)
PATCH 1/2 monitor: Use QERR_INVALID_PARAMETER instead of QERR_INVALID_CPU_INDEX
This changes the error message from "Invalid CPU index" to "Invalid parameter index" in the human monitor.
--- monitor.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
monitor.c +1 -1
@@ -897,7 +897,7 @@ static void do_cpu_set(Monitor *mon, const QDict *qdict, QObject **ret_data) {int index =qdict_get_int (qdict,"index" );if (mon_set_cpu (index) <0 ) -qemu_error_new (QERR_INVALID_CPU_INDEX ); +qemu_error_new (QERR_INVALID_PARAMETER ,"index" ); }static void do_info_jit (Monitor *mon)
Signature · 1 line
1.6.6
Anthony Liguori
AppliedRe: [Qemu-devel] [PATCH 1/2] monitor: Use QERR_INVALID_PARAMETER instead of QERR_INVALID_CPU_INDEX
Quoted 5 lines · Markus Armbruster
This changes the error message from "Invalid CPU index" to "Invalid parameter index" in the human monitor.
Signed-off-by Markus Armbruster<[email protected]>
Applied both. Thanks.
Regards,
Anthony Liguori
Quoted 18 lines
--- monitor.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)monitor.c +1
-1@@ -897,7 +897,7 @@ static void do_cpu_set(Monitor *mon, const QDict *qdict, QObject **ret_data) {int index =qdict_get_int (qdict,"index" );if (mon_set_cpu (index)<0 ) -qemu_error_new (QERR_INVALID_CPU_INDEX ); +qemu_error_new (QERR_INVALID_PARAMETER ,"index" ); }static void do_info_jit (Monitor *mon)
PATCH 2/2 Revert "QError: New QERR_INVALID_CPU_INDEX"
In reply to Markus ArmbrusterThis reverts commit 64a34bb14c0e358a6b2f14805e59ef25bf62d6d5.
--- qerror.c | 4 ---- qerror.h | 3 --- 2 files changed, 0 insertions(+), 7 deletions(-)
qerror.c +0 -4
@@ -81,10 +81,6 @@ static const QErrorStringTable qerror_table[] = { .desc = "Invalid block format %(name)", }, { - .error_fmt = QERR_INVALID_CPU_INDEX, - .desc = "Invalid CPU index", - }, - { .error_fmt = QERR_INVALID_PARAMETER, .desc = "Invalid parameter %(name)", },
qerror.h +0 -3
@@ -70,9 +70,6 @@ QError *qobject_to_qerror(const QObject *obj);#define QERR_INVALID_BLOCK_FORMAT \ "{ 'class': 'InvalidBlockFormat', 'data': { 'name': %s } }" -#define QERR_INVALID_CPU_INDEX \ - "{ 'class': 'InvalidCPUIndex', 'data': {} }" -#define QERR_INVALID_PARAMETER \ "{ 'class': 'InvalidParameter', 'data': { 'name': %s } }"
Signature · 1 line
1.6.6