public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: "Gabriel L. Somlo" <gsomlo@gmail.com>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: kvm@vger.kernel.org
Subject: Re: [kvm-kmod PATCH 2/2] sync: copy linux/vfio.h from kvm source tree
Date: Tue, 22 Apr 2014 14:43:43 -0400	[thread overview]
Message-ID: <20140422184342.GD1630@ERROL.INI.CMU.EDU> (raw)
In-Reply-To: <5356835C.1040009@siemens.com>

On Tue, Apr 22, 2014 at 04:57:32PM +0200, Jan Kiszka wrote:
> On 2014-04-22 16:52, gsomlo@gmail.com wrote:
> > Signed-off-by: Gabriel Somlo <somlo@cmu.edu>
> > ---
> > 
> > vfio.c gets copied by sync, and it needs vfio.h. I don't think there's
> > an easy way to #define ourselves out of this one, copying vfio.h into
> > kvm-kmod/include/linux/ seems to be the path of least resistance...
> > 
> > Thanks,
> >    Gabriel
> > 
> > P.S. I'm not a native Python speaker, so, while the glob() line does the
> > job, it may not be the most beautiful way to express the new requirement :)
> 
> I've a different mother languages as well ;).
> 
> Did you try if ...linux/{kvm*,vfio}.h works? If we have shell power here
> for pattern matching, it should.

I played around a bit, and I couldn't find a way to do full regex for
a glob() argument.

You can pick from a set of characters at a time:

'foo[0-9]bar' would match 'foo0bar', 'foo1bar', etc.

But nothing I found allows you to pick from a set of *substrings*,
which is what we'd need:

'foo(xyz|abc)bar' to match 'fooxyzbar' and 'fooabcbar' (but *not* say,
'foo123bar').

I tried parentheses, curly braces, with and without '\', with no success.

Not sure at this point there *is* a more eloquent way to express it
than what I sent you originally.

Learning Python *is* on my bucket list, just not right this minute... :)

Thanks,
--Gabriel

> > 
> >  sync | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/sync b/sync
> > index e447ec4..9902a11 100755
> > --- a/sync
> > +++ b/sync
> > @@ -433,6 +433,7 @@ def header_sync(arch):
> >      T = 'header'
> >      rmtree(T)
> >      for file in (glob('%(linux)s/include/linux/kvm*.h' % { 'linux': linux }) +
> > +                 glob('%(linux)s/include/linux/vfio.h' % { 'linux': linux }) +
> >                   glob('%(linux)s/include/uapi/linux/kvm*.h' % { 'linux': linux })):
> >          out = ('%(T)s/include/linux/%(name)s'
> >                 % { 'T': T, 'name': os.path.basename(file) })
> > 
> 
> -- 
> Siemens AG, Corporate Technology, CT RTC ITP SES-DE
> Corporate Competence Center Embedded Linux

  reply	other threads:[~2014-04-22 18:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-22 14:52 [kvm-kmod PATCH 2/2] sync: copy linux/vfio.h from kvm source tree gsomlo
2014-04-22 14:57 ` Jan Kiszka
2014-04-22 18:43   ` Gabriel L. Somlo [this message]
2014-04-23  6:00     ` Jan Kiszka

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=20140422184342.GD1630@ERROL.INI.CMU.EDU \
    --to=gsomlo@gmail.com \
    --cc=jan.kiszka@siemens.com \
    --cc=kvm@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox