From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:42136) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKQ9c-0007A6-DL for qemu-devel@nongnu.org; Tue, 26 Mar 2013 05:26:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UKQ9a-0000HB-RA for qemu-devel@nongnu.org; Tue, 26 Mar 2013 05:26:52 -0400 Received: from mail-bk0-x234.google.com ([2a00:1450:4008:c01::234]:56183) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKQ9a-0000H2-Gm for qemu-devel@nongnu.org; Tue, 26 Mar 2013 05:26:50 -0400 Received: by mail-bk0-f52.google.com with SMTP id it16so830944bkc.39 for ; Tue, 26 Mar 2013 02:26:49 -0700 (PDT) Date: Tue, 26 Mar 2013 10:26:46 +0100 From: Stefan Hajnoczi Message-ID: <20130326092646.GA24025@stefanha-thinkpad.redhat.com> References: <1363867631-5859-1-git-send-email-pl@kamp.de> <1363867631-5859-2-git-send-email-pl@kamp.de> <20130325140024.GA3267@stefanha-thinkpad.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH 2/2] vl.c: throw an error if iscsi is not supported List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Peter Lieven , qemu-devel@nongnu.org On Mon, Mar 25, 2013 at 02:34:01PM +0000, Peter Maydell wrote: > On 25 March 2013 14:10, Peter Lieven wrote: > > Am 25.03.2013 um 15:00 schrieb Stefan Hajnoczi : > >> On Thu, Mar 21, 2013 at 01:07:11PM +0100, Peter Lieven wrote: > >>> this patch adds a check for qemu_find_opts("iscsi") returning > >>> NULL instead of blindly passing the result to qemu_opts_parse(). > >>> > >>> Signed-off-by: Peter Lieven > >>> --- > >>> vl.c | 9 ++++++--- > >>> 1 file changed, 6 insertions(+), 3 deletions(-) > >> > >> Why is this change necessary? > > > > a) just to make sure we check the result of qemu_find_opts for NULL in case > > a bug stops registering the opts again > > It's OK to crash for "can't happen" cases IMHO. > > > b) to have an error output if libiscsi is not compiled in and someone passes > > an iscsi flag (analogue to the error if you supply -spice XXX) > > I don't have a strong opinion here but it would be good to be > consistent. At the moment (as well as iscsi) SLIRP, TPM and > mem_prealloc options all just vanish if qemu wasn't configured > with them supported. [Various other things like SDL and Windows > specific options do remain to produce an error.] So maybe we > should move all these options to "always exist but may produce > an error". Agreed. Either this patch should be dropped because it's not strictly necessary. Or we should be consistent and clean up all of vl.c:main(). There's not much point of just changing -iscsi. Stefan