[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 11/24] hmp: Fix definition of command quit
From: |
Michael Tokarev |
Subject: |
[Qemu-devel] [PULL 11/24] hmp: Fix definition of command quit |
Date: |
Thu, 19 Mar 2015 12:05:29 +0300 |
From: Markus Armbruster <address@hidden>
The command handler is a union of two function types. If
cmd->user_print is set, handle_user_command() calls
cmd->mhandler.cmd_new(), else cmd->mhandler.cmd().
Command definitions must therefore either set both user_print() and
mhandler.cmd_new(), or only mhandler.cmd().
quit's sets user_print and mhandler.cmd(). handle_user_command()
calls hmp_quit() through mhandler.cmd_new() rather than
mhandler.cmd(), i.e. through a function pointer with a different type.
Broken in commit 7a7f325, v1.0.
Works in practice because hmp_quit() doesn't use its arguments, and
handle_user_command() ignores its function value.
Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Michael Tokarev <address@hidden>
---
hmp-commands.hx | 1 -
1 file changed, 1 deletion(-)
diff --git a/hmp-commands.hx b/hmp-commands.hx
index 328709d..6fd5336 100644
--- a/hmp-commands.hx
+++ b/hmp-commands.hx
@@ -47,7 +47,6 @@ ETEXI
.args_type = "",
.params = "",
.help = "quit the emulator",
- .user_print = monitor_user_noop,
.mhandler.cmd = hmp_quit,
},
--
2.1.4
- [Qemu-devel] [PULL 01/24] cris: remove unused cris_cond15 declarations, (continued)
- [Qemu-devel] [PULL 01/24] cris: remove unused cris_cond15 declarations, Michael Tokarev, 2015/03/19
- [Qemu-devel] [PULL 10/24] target-moxie: Fix warnings from Sparse (one-bit signed bitfield), Michael Tokarev, 2015/03/19
- [Qemu-devel] [PULL 19/24] qtest/ahci: Fix a bit mask expression, Michael Tokarev, 2015/03/19
- [Qemu-devel] [PULL 05/24] arm/nseries: Fix warnings from Sparse, Michael Tokarev, 2015/03/19
- [Qemu-devel] [PULL 22/24] elf-loader: Fix truncation warning from coverity, Michael Tokarev, 2015/03/19
- [Qemu-devel] [PULL 02/24] backends: Fix warning from Sparse, Michael Tokarev, 2015/03/19
- [Qemu-devel] [PULL 17/24] smbios: add max speed comdline option for type-17 (meory device) structure, Michael Tokarev, 2015/03/19
- [Qemu-devel] [PULL 04/24] omap: Fix warnings from Sparse, Michael Tokarev, 2015/03/19
- [Qemu-devel] [PULL 13/24] arm: fix memory leak, Michael Tokarev, 2015/03/19
- [Qemu-devel] [PULL 23/24] elf-loader: Add missing error handling for call of lseek, Michael Tokarev, 2015/03/19
- [Qemu-devel] [PULL 11/24] hmp: Fix definition of command quit,
Michael Tokarev <=
- Re: [Qemu-devel] [PULL 00/24] Trivial patches for 2015-03-19, Peter Maydell, 2015/03/19