From: Wei Liu <wei.liu2@citrix.com>
To: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Wei Liu <wei.liu2@citrix.com>,
andrew.cooper3@citrix.com,
Ian Jackson <ian.jackson@eu.citrix.com>,
xen-devel@lists.xen.org, julien.grall@arm.com, jbeulich@suse.com,
zhaoshenglong@huawei.com, roger.pau@citrix.com
Subject: Re: [PATCH v6] acpi: Prevent GPL-only code from seeping into non-GPL binaries
Date: Mon, 26 Sep 2016 14:02:47 +0100 [thread overview]
Message-ID: <20160926130247.GZ16004@citrix.com> (raw)
In-Reply-To: <762e7091-93f9-1416-fde4-9dd7e0bdd167@oracle.com>
On Mon, Sep 26, 2016 at 08:58:00AM -0400, Boris Ostrovsky wrote:
> On 09/26/2016 06:24 AM, Wei Liu wrote:
> > On Mon, Sep 26, 2016 at 11:20:50AM +0100, Ian Jackson wrote:
> >> Wei Liu writes ("Re: [PATCH v6] acpi: Prevent GPL-only code from seeping into non-GPL binaries"):
> >>> On Fri, Sep 23, 2016 at 03:14:20PM -0400, Boris Ostrovsky wrote:
> >>>> +links="ABCD"
> >>>> +
> >>>> +for i in $(seq 0 3)
> >>>> +do
> >>>> + link=${links:$i:1}
> >>> This is not portable.
> >>>
> >>> Use following instead:
> >>>
> >>> links="A B C D"
> >>>
> >>> set $links
> >>> for link in $@
> >> What's wrong with
> >>
> >> links="A B C D"
> >>
> >> for link in $links; do
> >> ....
> >>
> >> ?
>
> There are two interdependent variables that I need to print. The C
> equivalent is
>
> for ( i = 0; i < 4; i++ )
> printf("%d %c\n", i, 'A'+i);
>
> The character value is derived from 'i', which in this example is an
> index into 'links' array.
>
> I suggested in response to Jan
>
> link=`echo "A B C D" | cut -d" " -f $i`
>
Oh, two variables. Then you could also do:
link=`echo $i | tr "1234" "ABCD"`
(cut and tr are both from coreutils, so I think we're fine with using
either of them)
Anyway, enough of discussion about shell script. Pick the method you
like. :-)
Wei.
>
>
> -boris
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-09-26 13:02 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-23 19:14 [PATCH v6] acpi: Prevent GPL-only code from seeping into non-GPL binaries Boris Ostrovsky
2016-09-26 6:46 ` Jan Beulich
2016-09-26 12:49 ` Boris Ostrovsky
2016-09-26 13:08 ` Jan Beulich
2016-09-26 13:43 ` Boris Ostrovsky
2016-09-26 13:51 ` Jan Beulich
2016-09-26 10:04 ` Wei Liu
2016-09-26 10:20 ` Ian Jackson
2016-09-26 10:24 ` Wei Liu
2016-09-26 12:58 ` Boris Ostrovsky
2016-09-26 13:02 ` Wei Liu [this message]
2016-09-26 14:45 ` Ian Jackson
2016-09-26 15:03 ` Boris Ostrovsky
2016-09-26 16:48 ` Ian Jackson
2016-09-26 18:20 ` Boris Ostrovsky
2016-09-27 9:24 ` Ian Jackson
2016-09-26 14:01 ` Boris Ostrovsky
2016-09-26 14:02 ` Wei Liu
2016-09-26 14:46 ` Ian Jackson
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=20160926130247.GZ16004@citrix.com \
--to=wei.liu2@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=boris.ostrovsky@oracle.com \
--cc=ian.jackson@eu.citrix.com \
--cc=jbeulich@suse.com \
--cc=julien.grall@arm.com \
--cc=roger.pau@citrix.com \
--cc=xen-devel@lists.xen.org \
--cc=zhaoshenglong@huawei.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.