diff options
author | Luiz Capitulino <lcapitulino@redhat.com> | 2011-09-28 11:06:15 -0300 |
---|---|---|
committer | Luiz Capitulino <lcapitulino@redhat.com> | 2011-10-04 11:02:57 -0300 |
commit | 5bc465e4b1b6f4582a400c0a7033a1c841744278 (patch) | |
tree | a720bd699684b208c6d7c7a2f0c4172b0d8419aa | |
parent | 38d226535aeebda24f579446e168ae3385f4ebd6 (diff) |
qapi: Convert system_powerdown
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
-rw-r--r-- | hmp-commands.hx | 3 | ||||
-rw-r--r-- | hmp.c | 5 | ||||
-rw-r--r-- | hmp.h | 1 | ||||
-rw-r--r-- | qapi-schema.json | 14 | ||||
-rw-r--r-- | qmp.c | 5 |
5 files changed, 26 insertions, 2 deletions
diff --git a/hmp-commands.hx b/hmp-commands.hx index b2f5cd1f47..07b493ca27 100644 --- a/hmp-commands.hx +++ b/hmp-commands.hx @@ -492,8 +492,7 @@ ETEXI .args_type = "", .params = "", .help = "send system power down event", - .user_print = monitor_user_noop, - .mhandler.cmd_new = do_system_powerdown, + .mhandler.cmd = hmp_system_powerdown, }, STEXI @@ -109,3 +109,8 @@ void hmp_system_reset(Monitor *mon, const QDict *qdict) { qmp_system_reset(NULL); } + +void hmp_system_powerdown(Monitor *mon, const QDict *qdict) +{ + qmp_system_powerdown(NULL); +} @@ -26,5 +26,6 @@ void hmp_info_chardev(Monitor *mon); void hmp_quit(Monitor *mon, const QDict *qdict); void hmp_stop(Monitor *mon, const QDict *qdict); void hmp_system_reset(Monitor *mon, const QDict *qdict); +void hmp_system_powerdown(Monitor *mon, const QDict *qdict); #endif diff --git a/qapi-schema.json b/qapi-schema.json index 02de4b55c6..5922c4a920 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -257,3 +257,17 @@ # Since: 0.14.0 ## { 'command': 'system_reset' } + +## +# @system_powerdown: +# +# Requests that a guest perform a powerdown operation. +# +# Since: 0.14.0 +# +# Notes: A guest may or may not respond to this command. This command +# returning does not indicate that a guest has accepted the request or +# that it has shut down. Many guests will respond to this command by +# prompting the user in some way. +## +{ 'command': 'system_powerdown' } @@ -85,3 +85,8 @@ void qmp_system_reset(Error **errp) { qemu_system_reset_request(); } + +void qmp_system_powerdown(Error **erp) +{ + qemu_system_powerdown_request(); +} |