diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2021-10-27 15:03:04 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2021-11-02 15:57:27 +0100 |
commit | 22afb46e7c6ed61bd41c199072cb4769d6ab14b2 (patch) | |
tree | dcde55a5d193315ccc10a9207c7ad198a43bbde3 /hw | |
parent | d12b64eaebd9f0df03c70422336c669a44ed2937 (diff) | |
download | qemu-22afb46e7c6ed61bd41c199072cb4769d6ab14b2.zip qemu-22afb46e7c6ed61bd41c199072cb4769d6ab14b2.tar.gz qemu-22afb46e7c6ed61bd41c199072cb4769d6ab14b2.tar.bz2 |
watchdog: remove select_watchdog_action
Instead of invoking select_watchdog_action from both HMP and command line,
go directly from HMP to QMP and use QemuOpts as the intermediary for the
command line.
This makes -watchdog-action explicitly a shortcut for "-action watchdog",
so that "-watchdog-action" and "-action watchdog" override each other
based on the position on the command line; previously, "-action watchdog"
always won.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/watchdog/watchdog.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/hw/watchdog/watchdog.c b/hw/watchdog/watchdog.c index 0e98ffb..1437e6c 100644 --- a/hw/watchdog/watchdog.c +++ b/hw/watchdog/watchdog.c @@ -76,20 +76,6 @@ int select_watchdog(const char *p) return 1; } -int select_watchdog_action(const char *p) -{ - int action; - char *qapi_value; - - qapi_value = g_ascii_strdown(p, -1); - action = qapi_enum_parse(&WatchdogAction_lookup, qapi_value, -1, NULL); - g_free(qapi_value); - if (action < 0) - return -1; - qmp_watchdog_set_action(action, &error_abort); - return 0; -} - WatchdogAction get_watchdog_action(void) { return watchdog_action; |