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