[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC PATCH 30/32] qapi/options: QAPIfy --watchdog-action ar
From: |
Markus Armbruster |
Subject: |
[Qemu-devel] [RFC PATCH 30/32] qapi/options: QAPIfy --watchdog-action argument type |
Date: |
Mon, 2 Oct 2017 17:25:50 +0200 |
Signed-off-by: Markus Armbruster <address@hidden>
---
qapi/options.json | 2 +-
vl.c | 7 ++-----
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/qapi/options.json b/qapi/options.json
index 853908560d..eb1a3e2dde 100644
--- a/qapi/options.json
+++ b/qapi/options.json
@@ -3868,7 +3868,7 @@
# !end texinfo
##
{ 'option': '--watchdog-action',
- 'data': 'str', # FIXME enum
+ 'data': 'WatchdogAction',
'help': [
"-watchdog-action reset|shutdown|poweroff|inject-nmi|pause|debug|none",
" action when watchdog fires [default=reset]"] }
diff --git a/vl.c b/vl.c
index 4af2905c60..1814a53337 100644
--- a/vl.c
+++ b/vl.c
@@ -3724,11 +3724,8 @@ int main(int argc, char **argv, char **envp)
watchdog = qopt[i].u.watchdog.data;
break;
case QAPI_OPTION_KIND_WATCHDOG_ACTION:
- if (select_watchdog_action(qopt[i].u.watchdog_action.data)
- == -1) {
- error_report("unknown -watchdog-action parameter");
- exit(1);
- }
+ qmp_watchdog_set_action(qopt[i].u.watchdog_action.data,
+ &error_abort);
break;
case QAPI_OPTION_KIND_VIRTIOCONSOLE:
add_device_config(DEV_VIRTCON, qopt[i].u.virtioconsole.data);
--
2.13.6
- [Qemu-devel] [RFC PATCH 04/32] qapi2texi: Fix for '@' not followed by \w character, (continued)
- [Qemu-devel] [RFC PATCH 04/32] qapi2texi: Fix for '@' not followed by \w character, Markus Armbruster, 2017/10/02
- [Qemu-devel] [RFC PATCH 09/32] qapi: check_type() parameter allow_optional is now unused, drop, Markus Armbruster, 2017/10/02
- [Qemu-devel] [RFC PATCH 13/32] qapi: Use argparse to open schema file, Markus Armbruster, 2017/10/02
- [Qemu-devel] [RFC PATCH 06/32] qapi2texi: Drop | example markup, Markus Armbruster, 2017/10/02
- [Qemu-devel] [RFC PATCH 29/32] qapi/options: QAPIfy --echr argument type, Markus Armbruster, 2017/10/02
- [Qemu-devel] [RFC PATCH 32/32] qapi/options: QAPIfy --add-fd argument type, Markus Armbruster, 2017/10/02
- [Qemu-devel] [RFC PATCH 22/32] qapi: New helper c_string(), Markus Armbruster, 2017/10/02
- [Qemu-devel] [RFC PATCH 30/32] qapi/options: QAPIfy --watchdog-action argument type,
Markus Armbruster <=
- [Qemu-devel] [RFC PATCH 08/32] qapi: Simplify check_name() parameters, Markus Armbruster, 2017/10/02
- [Qemu-devel] [RFC PATCH 10/32] qapi: Don't run generators twice, Markus Armbruster, 2017/10/02
- [Qemu-devel] [RFC PATCH 31/32] qapi/options: QAPIfy --blockdev argument type, Markus Armbruster, 2017/10/02
- [Qemu-devel] [RFC PATCH 05/32] qapi2texi: Provide access to Texinfo markup, Markus Armbruster, 2017/10/02
- [Qemu-devel] [RFC PATCH 21/32] qapi: Define QAPIOptionKind and QAPIOption automatically, Markus Armbruster, 2017/10/02
- [Qemu-devel] [RFC PATCH 23/32] qapi-options: Command line option backend, Markus Armbruster, 2017/10/02
- [Qemu-devel] [RFC PATCH 25/32] qapi-introspect: Include command line options information, Markus Armbruster, 2017/10/02