All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fam Zheng <famz@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: kwolf@redhat.com, jcody@redhat.com, qemu-devel@nongnu.org,
	stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH] block: add read only to whitelist
Date: Tue, 28 May 2013 16:34:22 +0800	[thread overview]
Message-ID: <20130528083422.GA4908@localhost.nay.redhat.com> (raw)
In-Reply-To: <51A46689.4060402@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

      reply	other threads:[~2013-05-28  8:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-28  6:44 [Qemu-devel] [PATCH] block: add read only to whitelist Fam Zheng
2013-05-28  8:00 ` Kevin Wolf
2013-05-28  8:02 ` Stefan Hajnoczi
2013-05-28  8:10 ` Paolo Bonzini
2013-05-28  8:34   ` Fam Zheng [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130528083422.GA4908@localhost.nay.redhat.com \
    --to=famz@redhat.com \
    --cc=jcody@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.