aboutsummaryrefslogtreecommitdiff
path: root/bootdevice.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2015-03-06 10:09:57 +0100
committerMichael Tokarev <mjt@tls.msk.ru>2015-03-19 11:11:55 +0300
commit46db7b862ab66d14679bb96563092e7ef76f1cfb (patch)
treee050d3a9220e206c9f3c296ff092e2844c6654f9 /bootdevice.c
parent6093d01194edd74e24d46028b84d9d4a0a5cba17 (diff)
hmp: Fix definition of command quit
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 <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'bootdevice.c')
0 files changed, 0 insertions, 0 deletions