From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: Michal Privoznik <mprivozn@redhat.com>
Subject: [Qemu-devel] [PULL 1/3] qapi: Rename WatchdogExpirationAction enum
Date: Mon, 2 Oct 2017 13:11:09 +0200 [thread overview]
Message-ID: <20171002111111.26932-2-armbru@redhat.com> (raw)
In-Reply-To: <20171002111111.26932-1-armbru@redhat.com>
From: Michal Privoznik <mprivozn@redhat.com>
The new name is WatchdogAction which is shorter,
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Message-Id: <dbd61a0928821348486d0d6260be2bd3b02b6402.1504771369.git.mprivozn@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
hw/watchdog/watchdog.c | 14 +++++++-------
monitor.c | 4 ++--
qapi/run-state.json | 6 +++---
3 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/hw/watchdog/watchdog.c b/hw/watchdog/watchdog.c
index 0c5c9cde1c..358d79804d 100644
--- a/hw/watchdog/watchdog.c
+++ b/hw/watchdog/watchdog.c
@@ -109,17 +109,17 @@ void watchdog_perform_action(void)
{
switch (watchdog_action) {
case WDT_RESET: /* same as 'system_reset' in monitor */
- qapi_event_send_watchdog(WATCHDOG_EXPIRATION_ACTION_RESET, &error_abort);
+ qapi_event_send_watchdog(WATCHDOG_ACTION_RESET, &error_abort);
qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET);
break;
case WDT_SHUTDOWN: /* same as 'system_powerdown' in monitor */
- qapi_event_send_watchdog(WATCHDOG_EXPIRATION_ACTION_SHUTDOWN, &error_abort);
+ qapi_event_send_watchdog(WATCHDOG_ACTION_SHUTDOWN, &error_abort);
qemu_system_powerdown_request();
break;
case WDT_POWEROFF: /* same as 'quit' command in monitor */
- qapi_event_send_watchdog(WATCHDOG_EXPIRATION_ACTION_POWEROFF, &error_abort);
+ qapi_event_send_watchdog(WATCHDOG_ACTION_POWEROFF, &error_abort);
exit(0);
case WDT_PAUSE: /* same as 'stop' command in monitor */
@@ -127,21 +127,21 @@ void watchdog_perform_action(void)
* you would get a deadlock. Bypass the problem.
*/
qemu_system_vmstop_request_prepare();
- qapi_event_send_watchdog(WATCHDOG_EXPIRATION_ACTION_PAUSE, &error_abort);
+ qapi_event_send_watchdog(WATCHDOG_ACTION_PAUSE, &error_abort);
qemu_system_vmstop_request(RUN_STATE_WATCHDOG);
break;
case WDT_DEBUG:
- qapi_event_send_watchdog(WATCHDOG_EXPIRATION_ACTION_DEBUG, &error_abort);
+ qapi_event_send_watchdog(WATCHDOG_ACTION_DEBUG, &error_abort);
fprintf(stderr, "watchdog: timer fired\n");
break;
case WDT_NONE:
- qapi_event_send_watchdog(WATCHDOG_EXPIRATION_ACTION_NONE, &error_abort);
+ qapi_event_send_watchdog(WATCHDOG_ACTION_NONE, &error_abort);
break;
case WDT_NMI:
- qapi_event_send_watchdog(WATCHDOG_EXPIRATION_ACTION_INJECT_NMI,
+ qapi_event_send_watchdog(WATCHDOG_ACTION_INJECT_NMI,
&error_abort);
nmi_monitor_handle(0, NULL);
break;
diff --git a/monitor.c b/monitor.c
index f4856b9268..94fb197c0d 100644
--- a/monitor.c
+++ b/monitor.c
@@ -3541,8 +3541,8 @@ void watchdog_action_completion(ReadLineState *rs, int nb_args, const char *str)
return;
}
readline_set_completion_index(rs, strlen(str));
- for (i = 0; i < WATCHDOG_EXPIRATION_ACTION__MAX; i++) {
- add_completion_option(rs, str, WatchdogExpirationAction_str(i));
+ for (i = 0; i < WATCHDOG_ACTION__MAX; i++) {
+ add_completion_option(rs, str, WatchdogAction_str(i));
}
}
diff --git a/qapi/run-state.json b/qapi/run-state.json
index d36ff49834..bca46a8785 100644
--- a/qapi/run-state.json
+++ b/qapi/run-state.json
@@ -253,10 +253,10 @@
#
##
{ 'event': 'WATCHDOG',
- 'data': { 'action': 'WatchdogExpirationAction' } }
+ 'data': { 'action': 'WatchdogAction' } }
##
-# @WatchdogExpirationAction:
+# @WatchdogAction:
#
# An enumeration of the actions taken when the watchdog device's timer is
# expired
@@ -279,7 +279,7 @@
#
# Since: 2.1
##
-{ 'enum': 'WatchdogExpirationAction',
+{ 'enum': 'WatchdogAction',
'data': [ 'reset', 'shutdown', 'poweroff', 'pause', 'debug', 'none',
'inject-nmi' ] }
--
2.13.6
next prev parent reply other threads:[~2017-10-02 11:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-02 11:11 [Qemu-devel] [PULL 0/3] QAPI patches for 2017-10-02 Markus Armbruster
2017-10-02 11:11 ` Markus Armbruster [this message]
2017-10-02 11:11 ` [Qemu-devel] [PULL 2/3] watchdog.h: Drop local redefinition of actions enum Markus Armbruster
2017-10-02 11:11 ` [Qemu-devel] [PULL 3/3] watchdog: Allow setting action on the fly Markus Armbruster
2017-10-02 11:42 ` [Qemu-devel] [PULL 0/3] QAPI patches for 2017-10-02 no-reply
2017-10-02 14:36 ` Eric Blake
2017-10-02 17:17 ` Markus Armbruster
2017-10-03 15:26 ` Peter Maydell
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=20171002111111.26932-2-armbru@redhat.com \
--to=armbru@redhat.com \
--cc=mprivozn@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).