All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: [PATCH 1/2] Make xencommons a bit more idiomatic
Date: Tue, 30 Aug 2011 10:47:26 -0700	[thread overview]
Message-ID: <4E5D222E.2040208@goop.org> (raw)
In-Reply-To: <20061.4783.289388.358884@mariner.uk.xensource.com>

On 08/30/2011 09:41 AM, Ian Jackson wrote:
> Jeremy Fitzhardinge writes ("[Xen-devel] [PATCH 1/2] Make xencommons a bit more idiomatic"):
>> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
> ...
>> -if test "x$1" = xstart && \
>> -     test -d /proc/xen && \
>> -   ! test -f /proc/xen/capabilities && \
>> -   ! grep '^xenfs ' /proc/mounts >/dev/null;
>> -then
>> +if [ "x$1" = xstart -a -d /proc/xen -a \
>> +    ! -f /proc/xen/capabilities ] && \
>> +    ! grep -qw '^xenfs' /proc/mounts; then
>>  	mount -t xenfs xenfs /proc/xen
> I'm afraid I'm reluctant to accept this purely stylistic change.  I
> might if it seemed to me to be a clear improvement, but I don't think
> that's the case.
>
> If anything we should be moving towards the use of && rather than -a,
> as that is harmless and will make the script depend less on /bin/bash.

No, you've misread it.  I'm changing it to use test for all the
file-existence checks in it's idiomatic form of '[', which implements
-a.  It is not at all bash-specific.

    J

      reply	other threads:[~2011-08-30 17:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-20  0:49 [PATCH 1/2] Make xencommons a bit more idiomatic Jeremy Fitzhardinge
2011-08-20  8:21 ` Olaf Hering
2011-08-21  0:33   ` Jeremy Fitzhardinge
2011-08-30 16:41 ` Ian Jackson
2011-08-30 17:47   ` Jeremy Fitzhardinge [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=4E5D222E.2040208@goop.org \
    --to=jeremy@goop.org \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=xen-devel@lists.xensource.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.