From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49050) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxaiJ-0000oF-85 for qemu-devel@nongnu.org; Wed, 27 May 2015 08:45:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YxaiE-00036A-7F for qemu-devel@nongnu.org; Wed, 27 May 2015 08:45:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49586) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxaiE-000364-2g for qemu-devel@nongnu.org; Wed, 27 May 2015 08:45:34 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id B06E8C1F1F for ; Wed, 27 May 2015 12:45:33 +0000 (UTC) Message-ID: <5565BC69.7020402@redhat.com> Date: Wed, 27 May 2015 14:45:29 +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: >> > - 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' Paolo