From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:57178) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhEzn-0007jI-8k for qemu-devel@nongnu.org; Tue, 28 May 2013 04:11:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UhEzk-0005wf-6M for qemu-devel@nongnu.org; Tue, 28 May 2013 04:11:02 -0400 Received: from mail-ea0-x232.google.com ([2a00:1450:4013:c01::232]:57897) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhEzj-0005wW-UJ for qemu-devel@nongnu.org; Tue, 28 May 2013 04:11:00 -0400 Received: by mail-ea0-f178.google.com with SMTP id q16so4530424ead.9 for ; Tue, 28 May 2013 01:10:59 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <51A46689.4060402@redhat.com> Date: Tue, 28 May 2013 10:10:49 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1369723466-3288-1-git-send-email-famz@redhat.com> In-Reply-To: <1369723466-3288-1-git-send-email-famz@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] block: add read only to whitelist List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: kwolf@redhat.com, jcody@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com 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? 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. :) Paolo > echo " \"${drv}\",\\" > done > echo " NULL" > + echo "#define CONFIG_BDRV_WHITELIST_RO \\" > + for drv in ${line#*=}; do > + [[ "${drv}" != ^* ]] && continue; > + echo " \"${drv#^}\",\\" > + done > + echo " NULL" > ;; > CONFIG_*=y) # configuration > name=${line%=*} >