From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50406) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yxal4-0003B0-OI for qemu-devel@nongnu.org; Wed, 27 May 2015 08:48:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yxal0-0004FV-BE for qemu-devel@nongnu.org; Wed, 27 May 2015 08:48:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45525) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yxal0-0004FR-69 for qemu-devel@nongnu.org; Wed, 27 May 2015 08:48:26 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id C7013B6A45 for ; Wed, 27 May 2015 12:48:25 +0000 (UTC) Date: Wed, 27 May 2015 13:48:24 +0100 From: "Richard W.M. Jones" Message-ID: <20150527124824.GN29283@redhat.com> References: <1432730126-33400-1-git-send-email-pbonzini@redhat.com> <20150527124144.GM29283@redhat.com> <5565BC69.7020402@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5565BC69.7020402@redhat.com> Subject: Re: [Qemu-devel] [PATCH] watchdog: convert to QemuOpts List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org, armbru@redhat.com On Wed, May 27, 2015 at 02:45:29PM +0200, Paolo Bonzini wrote: > > > On 27/05/2015 14:41, Richard W.M. Jones wrote: > >> > - 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)? > > Oh, I forgot to answer this. Any error message is printed by > qemu_opts_parse, for example: > > $ x86_64-softmmu/qemu-system-x86_64 -watchdog foo=bar > qemu-system-x86_64: -watchdog foo=bar: Invalid parameter 'foo' Patch seems fine then, ACK. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org