[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] watchdog: convert to QemuOpts
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH] watchdog: convert to QemuOpts |
Date: |
Wed, 27 May 2015 14:44:33 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 |
On 27/05/2015 14:41, Richard W.M. Jones wrote:
> On Wed, May 27, 2015 at 02:35:26PM +0200, Paolo Bonzini wrote:
>> case QEMU_OPTION_watchdog:
>> - if (watchdog) {
>> - fprintf(stderr,
>> - "qemu: only one watchdog option may be
>> given\n");
>> - return 1;
>> + olist = qemu_find_opts("watchdog");
>> + opts = qemu_opts_parse(olist, optarg, 1);
>> + if (!opts) {
>> + exit(1);
>> }
>
> Is there an error message missing (before the call to exit)?
>
> Patch seems OK otherwise.
>
> libvirt still uses
>
> -watchdog <model> -watchdog-action <action>
>
> Should it be changed to use -device? I'm guessing for backwards
> compatibility with old and current qemu it probably shouldn't be
> changed for a few years.
-device has been working forever for watchdogs. Changing libvirt to
-device would be possible, but cosmetic. Changing to "-watchdog
action=foo" is also entirely cosmetic, and would not work on older
QEMUs, so again there's no need.
The advantage of this patch would be for -readconfig users, which
couldn't specify the watchdog action. Or you could put '[watchdog]
action="pause"' in /etc/qemu/qemu.conf if you're into obscure
configuration files.
Paolo