From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48858) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxahP-00082J-CA for qemu-devel@nongnu.org; Wed, 27 May 2015 08:44:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YxahK-0002MI-D7 for qemu-devel@nongnu.org; Wed, 27 May 2015 08:44:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42702) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxahK-0002MC-5k for qemu-devel@nongnu.org; Wed, 27 May 2015 08:44:38 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t4RCib4X012613 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Wed, 27 May 2015 08:44:37 -0400 Message-ID: <5565BC31.8010404@redhat.com> Date: Wed, 27 May 2015 14:44:33 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1432730126-33400-1-git-send-email-pbonzini@redhat.com> <20150527124144.GM29283@redhat.com> In-Reply-To: <20150527124144.GM29283@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] watchdog: convert to QemuOpts List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Richard W.M. Jones" Cc: qemu-devel@nongnu.org, armbru@redhat.com 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 -watchdog-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