* [Qemu-devel] [PATCH 0/2 for 2.11] Minor HMP fixes
@ 2017-08-17 10:42 Dr. David Alan Gilbert (git)
2017-08-17 10:42 ` [Qemu-devel] [PATCH 1/2] hmp: Missing handle_errors Dr. David Alan Gilbert (git)
2017-08-17 10:42 ` [Qemu-devel] [PATCH 2/2] hmp: Fix unknown command for subtable Dr. David Alan Gilbert (git)
0 siblings, 2 replies; 5+ messages in thread
From: Dr. David Alan Gilbert (git) @ 2017-08-17 10:42 UTC (permalink / raw)
To: qemu-devel, armbru
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
A couple of minor HMP fixes
Dr. David Alan Gilbert (2):
hmp: Missing handle_errors
hmp: Fix unknown command for subtable
hmp.c | 2 ++
monitor.c | 7 ++++---
2 files changed, 6 insertions(+), 3 deletions(-)
--
2.13.5
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Qemu-devel] [PATCH 1/2] hmp: Missing handle_errors
2017-08-17 10:42 [Qemu-devel] [PATCH 0/2 for 2.11] Minor HMP fixes Dr. David Alan Gilbert (git)
@ 2017-08-17 10:42 ` Dr. David Alan Gilbert (git)
2017-08-17 11:09 ` Eric Blake
2017-08-17 10:42 ` [Qemu-devel] [PATCH 2/2] hmp: Fix unknown command for subtable Dr. David Alan Gilbert (git)
1 sibling, 1 reply; 5+ messages in thread
From: Dr. David Alan Gilbert (git) @ 2017-08-17 10:42 UTC (permalink / raw)
To: qemu-devel, armbru
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
hmp_info_memdev && hmp_info_memory_devices were missing
hmp_handle_error calls. Add them.
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
hmp.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hmp.c b/hmp.c
index 10400386e0..dc6cf7d583 100644
--- a/hmp.c
+++ b/hmp.c
@@ -2395,6 +2395,7 @@ void hmp_info_memdev(Monitor *mon, const QDict *qdict)
monitor_printf(mon, "\n");
qapi_free_MemdevList(memdev_list);
+ hmp_handle_error(mon, &err);
}
void hmp_info_memory_devices(Monitor *mon, const QDict *qdict)
@@ -2433,6 +2434,7 @@ void hmp_info_memory_devices(Monitor *mon, const QDict *qdict)
}
qapi_free_MemoryDeviceInfoList(info_list);
+ hmp_handle_error(mon, &err);
}
void hmp_info_iothreads(Monitor *mon, const QDict *qdict)
--
2.13.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Qemu-devel] [PATCH 2/2] hmp: Fix unknown command for subtable
2017-08-17 10:42 [Qemu-devel] [PATCH 0/2 for 2.11] Minor HMP fixes Dr. David Alan Gilbert (git)
2017-08-17 10:42 ` [Qemu-devel] [PATCH 1/2] hmp: Missing handle_errors Dr. David Alan Gilbert (git)
@ 2017-08-17 10:42 ` Dr. David Alan Gilbert (git)
2017-08-17 11:11 ` Eric Blake
1 sibling, 1 reply; 5+ messages in thread
From: Dr. David Alan Gilbert (git) @ 2017-08-17 10:42 UTC (permalink / raw)
To: qemu-devel, armbru
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
(qemu) info foo
unknown command: 'foo'
fix this to:
(qemu) info foo
unknown command: 'info foo'
Reported-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
monitor.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/monitor.c b/monitor.c
index e0f880107f..0695bd59d4 100644
--- a/monitor.c
+++ b/monitor.c
@@ -2693,6 +2693,7 @@ static const mon_cmd_t *search_dispatch_table(const mon_cmd_t *disp_table,
* the command is found in a sub-command table.
*/
static const mon_cmd_t *monitor_parse_command(Monitor *mon,
+ const char *cmdp_start,
const char **cmdp,
mon_cmd_t *table)
{
@@ -2708,7 +2709,7 @@ static const mon_cmd_t *monitor_parse_command(Monitor *mon,
cmd = search_dispatch_table(table, cmdname);
if (!cmd) {
monitor_printf(mon, "unknown command: '%.*s'\n",
- (int)(p - *cmdp), *cmdp);
+ (int)(p - cmdp_start), cmdp_start);
return NULL;
}
@@ -2720,7 +2721,7 @@ static const mon_cmd_t *monitor_parse_command(Monitor *mon,
*cmdp = p;
/* search sub command */
if (cmd->sub_table != NULL && *p != '\0') {
- return monitor_parse_command(mon, cmdp, cmd->sub_table);
+ return monitor_parse_command(mon, cmdp_start, cmdp, cmd->sub_table);
}
return cmd;
@@ -3104,7 +3105,7 @@ static void handle_hmp_command(Monitor *mon, const char *cmdline)
trace_handle_hmp_command(mon, cmdline);
- cmd = monitor_parse_command(mon, &cmdline, mon->cmd_table);
+ cmd = monitor_parse_command(mon, cmdline, &cmdline, mon->cmd_table);
if (!cmd) {
return;
}
--
2.13.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH 1/2] hmp: Missing handle_errors
2017-08-17 10:42 ` [Qemu-devel] [PATCH 1/2] hmp: Missing handle_errors Dr. David Alan Gilbert (git)
@ 2017-08-17 11:09 ` Eric Blake
0 siblings, 0 replies; 5+ messages in thread
From: Eric Blake @ 2017-08-17 11:09 UTC (permalink / raw)
To: Dr. David Alan Gilbert (git), qemu-devel, armbru
[-- Attachment #1: Type: text/plain, Size: 524 bytes --]
On 08/17/2017 05:42 AM, Dr. David Alan Gilbert (git) wrote:
> From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
>
> hmp_info_memdev && hmp_info_memory_devices were missing
> hmp_handle_error calls. Add them.
>
> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> ---
> hmp.c | 2 ++
> 1 file changed, 2 insertions(+)
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 619 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH 2/2] hmp: Fix unknown command for subtable
2017-08-17 10:42 ` [Qemu-devel] [PATCH 2/2] hmp: Fix unknown command for subtable Dr. David Alan Gilbert (git)
@ 2017-08-17 11:11 ` Eric Blake
0 siblings, 0 replies; 5+ messages in thread
From: Eric Blake @ 2017-08-17 11:11 UTC (permalink / raw)
To: Dr. David Alan Gilbert (git), qemu-devel, armbru
[-- Attachment #1: Type: text/plain, Size: 625 bytes --]
On 08/17/2017 05:42 AM, Dr. David Alan Gilbert (git) wrote:
> From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
>
> (qemu) info foo
> unknown command: 'foo'
>
> fix this to:
> (qemu) info foo
> unknown command: 'info foo'
>
> Reported-by: Markus Armbruster <armbru@redhat.com>
> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> ---
> monitor.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 619 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-08-17 11:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-17 10:42 [Qemu-devel] [PATCH 0/2 for 2.11] Minor HMP fixes Dr. David Alan Gilbert (git)
2017-08-17 10:42 ` [Qemu-devel] [PATCH 1/2] hmp: Missing handle_errors Dr. David Alan Gilbert (git)
2017-08-17 11:09 ` Eric Blake
2017-08-17 10:42 ` [Qemu-devel] [PATCH 2/2] hmp: Fix unknown command for subtable Dr. David Alan Gilbert (git)
2017-08-17 11:11 ` Eric Blake
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).