[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 26/26] qapi: Convert system_powerdown
From: |
Luiz Capitulino |
Subject: |
[Qemu-devel] [PATCH 26/26] qapi: Convert system_powerdown |
Date: |
Fri, 30 Sep 2011 17:34:51 -0300 |
Signed-off-by: Anthony Liguori <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>
---
hmp-commands.hx | 3 +--
hmp.c | 5 +++++
hmp.h | 1 +
qapi-schema.json | 14 ++++++++++++++
qmp.c | 5 +++++
5 files changed, 26 insertions(+), 2 deletions(-)
diff --git a/hmp-commands.hx b/hmp-commands.hx
index b2f5cd1..07b493c 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
diff --git a/hmp.c b/hmp.c
index 24f30bc..34416fc 100644
--- a/hmp.c
+++ b/hmp.c
@@ -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);
+}
diff --git a/hmp.h b/hmp.h
index a49a6e6..92433cf 100644
--- a/hmp.h
+++ b/hmp.h
@@ -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 02de4b5..5922c4a 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' }
diff --git a/qmp.c b/qmp.c
index 51d9383..bf58b05 100644
--- a/qmp.c
+++ b/qmp.c
@@ -85,3 +85,8 @@ void qmp_system_reset(Error **errp)
{
qemu_system_reset_request();
}
+
+void qmp_system_powerdown(Error **erp)
+{
+ qemu_system_powerdown_request();
+}
--
1.7.7.rc0.72.g4b5ea
- [Qemu-devel] [PATCH 16/26] vl: Change qemu_vmstop_requested() to return a bool, (continued)
- [Qemu-devel] [PATCH 16/26] vl: Change qemu_vmstop_requested() to return a bool, Luiz Capitulino, 2011/09/30
- [Qemu-devel] [PATCH 15/26] qapi: Convert query-kvm, Luiz Capitulino, 2011/09/30
- [Qemu-devel] [PATCH 03/26] qapi: add code generation support for middle mode, Luiz Capitulino, 2011/09/30
- [Qemu-devel] [PATCH 25/26] qapi: Convert system_reset, Luiz Capitulino, 2011/09/30
- [Qemu-devel] [PATCH 20/26] qapi: Convert query-uuid, Luiz Capitulino, 2011/09/30
- [Qemu-devel] [PATCH 18/26] RunState: Rename enum values as generated by the QAPI, Luiz Capitulino, 2011/09/30
- [Qemu-devel] [PATCH 21/26] qapi: Convert query-chardev, Luiz Capitulino, 2011/09/30
- [Qemu-devel] [PATCH 19/26] qapi: Convert query-status, Luiz Capitulino, 2011/09/30
- [Qemu-devel] [PATCH 22/26] qapi: Convert query-commands, Luiz Capitulino, 2011/09/30
- [Qemu-devel] [PATCH 24/26] qapi: Convert stop, Luiz Capitulino, 2011/09/30
- [Qemu-devel] [PATCH 26/26] qapi: Convert system_powerdown,
Luiz Capitulino <=
- [Qemu-devel] [PATCH 23/26] qapi: Convert quit, Luiz Capitulino, 2011/09/30