* [Qemu-devel] [PATCH 0/2] Avoid extra error for do_cpu_set()
@ 2010-01-29 9:33 Markus Armbruster
2010-01-29 9:34 ` [Qemu-devel] [PATCH 1/2] monitor: Use QERR_INVALID_PARAMETER instead of QERR_INVALID_CPU_INDEX Markus Armbruster
2010-01-29 9:34 ` [Qemu-devel] [PATCH 2/2] Revert "QError: New QERR_INVALID_CPU_INDEX" Markus Armbruster
0 siblings, 2 replies; 4+ messages in thread
From: Markus Armbruster @ 2010-01-29 9:33 UTC (permalink / raw)
To: qemu-devel
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(-)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Qemu-devel] [PATCH 1/2] monitor: Use QERR_INVALID_PARAMETER instead of QERR_INVALID_CPU_INDEX
2010-01-29 9:33 [Qemu-devel] [PATCH 0/2] Avoid extra error for do_cpu_set() Markus Armbruster
@ 2010-01-29 9:34 ` Markus Armbruster
2010-02-03 18:50 ` Anthony Liguori
2010-01-29 9:34 ` [Qemu-devel] [PATCH 2/2] Revert "QError: New QERR_INVALID_CPU_INDEX" Markus Armbruster
1 sibling, 1 reply; 4+ messages in thread
From: Markus Armbruster @ 2010-01-29 9:34 UTC (permalink / raw)
To: qemu-devel
This changes the error message from "Invalid CPU index" to "Invalid
parameter index" in the human monitor.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
monitor.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/monitor.c b/monitor.c
index fb7c572..69ebac5 100644
--- a/monitor.c
+++ b/monitor.c
@@ -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)
--
1.6.6
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Qemu-devel] [PATCH 2/2] Revert "QError: New QERR_INVALID_CPU_INDEX"
2010-01-29 9:33 [Qemu-devel] [PATCH 0/2] Avoid extra error for do_cpu_set() Markus Armbruster
2010-01-29 9:34 ` [Qemu-devel] [PATCH 1/2] monitor: Use QERR_INVALID_PARAMETER instead of QERR_INVALID_CPU_INDEX Markus Armbruster
@ 2010-01-29 9:34 ` Markus Armbruster
1 sibling, 0 replies; 4+ messages in thread
From: Markus Armbruster @ 2010-01-29 9:34 UTC (permalink / raw)
To: qemu-devel
This reverts commit 64a34bb14c0e358a6b2f14805e59ef25bf62d6d5.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
qerror.c | 4 ----
qerror.h | 3 ---
2 files changed, 0 insertions(+), 7 deletions(-)
diff --git a/qerror.c b/qerror.c
index 6c2aba0..2f657f4 100644
--- a/qerror.c
+++ b/qerror.c
@@ -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)",
},
diff --git a/qerror.h b/qerror.h
index 57c5b97..ee59615 100644
--- a/qerror.h
+++ b/qerror.h
@@ -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 } }"
--
1.6.6
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH 1/2] monitor: Use QERR_INVALID_PARAMETER instead of QERR_INVALID_CPU_INDEX
2010-01-29 9:34 ` [Qemu-devel] [PATCH 1/2] monitor: Use QERR_INVALID_PARAMETER instead of QERR_INVALID_CPU_INDEX Markus Armbruster
@ 2010-02-03 18:50 ` Anthony Liguori
0 siblings, 0 replies; 4+ messages in thread
From: Anthony Liguori @ 2010-02-03 18:50 UTC (permalink / raw)
To: Markus Armbruster; +Cc: qemu-devel
On 01/29/2010 03:34 AM, Markus Armbruster wrote:
> This changes the error message from "Invalid CPU index" to "Invalid
> parameter index" in the human monitor.
>
> Signed-off-by: Markus Armbruster<armbru@redhat.com>
>
Applied both. Thanks.
Regards,
Anthony Liguori
> ---
> monitor.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/monitor.c b/monitor.c
> index fb7c572..69ebac5 100644
> --- a/monitor.c
> +++ b/monitor.c
> @@ -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)
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-02-03 18:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-29 9:33 [Qemu-devel] [PATCH 0/2] Avoid extra error for do_cpu_set() Markus Armbruster
2010-01-29 9:34 ` [Qemu-devel] [PATCH 1/2] monitor: Use QERR_INVALID_PARAMETER instead of QERR_INVALID_CPU_INDEX Markus Armbruster
2010-02-03 18:50 ` Anthony Liguori
2010-01-29 9:34 ` [Qemu-devel] [PATCH 2/2] Revert "QError: New QERR_INVALID_CPU_INDEX" Markus Armbruster
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).