qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: qemu-devel@nongnu.org
Cc: eblake@redhat.com, armbru@redhat.com, pbonzini@redhat.com,
	kwolf@redhat.com, mreitz@redhat.com
Subject: [Qemu-devel] [PATCH 2/3] qapi: split host-qmp into quit and system-reset
Date: Wed, 31 Oct 2018 12:52:41 +0100	[thread overview]
Message-ID: <20181031115242.6558-3-d.csapak@proxmox.com> (raw)
In-Reply-To: <20181031115242.6558-1-d.csapak@proxmox.com>

it is interesting to know whether the shutdown cause was 'quit' or
'reset', especially when using --no-reboot

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 qapi/run-state.json | 10 ++++++----
 qmp.c               |  4 ++--
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/qapi/run-state.json b/qapi/run-state.json
index 883bed167c..c215b6ef83 100644
--- a/qapi/run-state.json
+++ b/qapi/run-state.json
@@ -68,7 +68,9 @@
 #
 # @host-error: An error prevented further use of guest
 #
-# @host-qmp: Reaction to a QMP command, like 'quit'
+# @host-qmp-quit: Reaction to the QMP command 'quit'
+#
+# @host-qmp-system-reset: Reaction to the QMP command 'system_reset'
 #
 # @host-signal: Reaction to a signal, such as SIGINT
 #
@@ -88,9 +90,9 @@
 #
 ##
 { 'enum': 'ShutdownCause',
-  'data': [ 'none', 'host-error', 'host-qmp', 'host-signal', 'host-ui',
-            'guest-shutdown', 'guest-reset', 'guest-panic',
-            'subsystem-reset'] }
+  'data': [ 'none', 'host-error', 'host-qmp-quit', 'host-qmp-system-reset',
+            'host-signal', 'host-ui', 'guest-shutdown', 'guest-reset',
+            'guest-panic', 'subsystem-reset'] }
 
 ##
 # @StatusInfo:
diff --git a/qmp.c b/qmp.c
index e7c0a2fd60..82298f6cb0 100644
--- a/qmp.c
+++ b/qmp.c
@@ -88,7 +88,7 @@ UuidInfo *qmp_query_uuid(Error **errp)
 void qmp_quit(Error **errp)
 {
     no_shutdown = 0;
-    qemu_system_shutdown_request(SHUTDOWN_CAUSE_HOST_QMP);
+    qemu_system_shutdown_request(SHUTDOWN_CAUSE_HOST_QMP_QUIT);
 }
 
 void qmp_stop(Error **errp)
@@ -109,7 +109,7 @@ void qmp_stop(Error **errp)
 
 void qmp_system_reset(Error **errp)
 {
-    qemu_system_reset_request(SHUTDOWN_CAUSE_HOST_QMP);
+    qemu_system_reset_request(SHUTDOWN_CAUSE_HOST_QMP_SYSTEM_RESET);
 }
 
 void qmp_system_powerdown(Error **erp)
-- 
2.11.0

  parent reply	other threads:[~2018-10-31 11:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-31 11:52 [Qemu-devel] [PATCH 0/3] qapi: return ShutdownCause for events Dominik Csapak
2018-10-31 11:52 ` [Qemu-devel] [PATCH 1/3] qapi: move ShutdownCause to qapi/run-state.json Dominik Csapak
2018-11-30  9:00   ` Markus Armbruster
2018-11-30  9:15     ` Markus Armbruster
2018-10-31 11:52 ` Dominik Csapak [this message]
2018-11-30  9:41   ` [Qemu-devel] [PATCH 2/3] qapi: split host-qmp into quit and system-reset Markus Armbruster
2018-11-30 13:20     ` Dominik Csapak
2018-11-30 13:55       ` Eric Blake
2018-10-31 11:52 ` [Qemu-devel] [PATCH 3/3] qapi: add reason to SHUTDOWN and RESET events Dominik Csapak
2018-11-30  9:43   ` Markus Armbruster
2018-11-19 13:45 ` [Qemu-devel] [PATCH 0/3] qapi: return ShutdownCause for events Dominik Csapak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181031115242.6558-3-d.csapak@proxmox.com \
    --to=d.csapak@proxmox.com \
    --cc=armbru@redhat.com \
    --cc=eblake@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).