From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:34131) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhFMa-0000gZ-4c for qemu-devel@nongnu.org; Tue, 28 May 2013 04:34:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UhFMQ-0004zP-8z for qemu-devel@nongnu.org; Tue, 28 May 2013 04:34:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:4538) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhFMQ-0004zG-0i for qemu-devel@nongnu.org; Tue, 28 May 2013 04:34: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 (8.14.4/8.14.4) with ESMTP id r4S8YPsv017892 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 28 May 2013 04:34:25 -0400 Date: Tue, 28 May 2013 16:34:22 +0800 From: Fam Zheng Message-ID: <20130528083422.GA4908@localhost.nay.redhat.com> References: <1369723466-3288-1-git-send-email-famz@redhat.com> <51A46689.4060402@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <51A46689.4060402@redhat.com> Subject: Re: [Qemu-devel] [PATCH] block: add read only to whitelist List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: kwolf@redhat.com, jcody@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com On Tue, 05/28 10:10, Paolo Bonzini wrote: > Il 28/05/2013 08:44, Fam Zheng ha scritto: > > diff --git a/scripts/create_config b/scripts/create_config > > index c471e8c..2dfda3e 100755 > > --- a/scripts/create_config > > +++ b/scripts/create_config > > @@ -35,11 +35,18 @@ case $line in > > echo "" > > ;; > > CONFIG_BDRV_WHITELIST=*) > > - echo "#define CONFIG_BDRV_WHITELIST \\" > > + echo "#define CONFIG_BDRV_WHITELIST_RW \\" > > for drv in ${line#*=}; do > > + [[ "${drv}" = ^* ]] && continue; > > I didn't know about this feature. Can you point me to the documentation? Yes, it is bash only, I'd better use a more compatible way. http://mywiki.wooledge.org/glob > > You would need to change the #! header to "#! /bin/bash" if you use it, > but since you have to respin anyway, I'd ask you to use "case" instead. :) As Stefan and Kevin pointed out, I'll replace ^ prefix with a separate configure option, it'll become CONFIG_BDRV_WHITELIST_RW=*) ... ;; CONFIG_BDRV_WHITELIST_RO=*) ... ;; Then I won't need globbing. -- Fam