All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richie <listmail@triad.rr.com>
To: Keir Fraser <keir.fraser@eu.citrix.com>
Cc: Xen Devel <xen-devel@lists.xensource.com>
Subject: Re: [PATCH] xend: update init script to avoid grep on non-existent file system
Date: Sat, 15 May 2010 10:56:00 -0400	[thread overview]
Message-ID: <4BEEB600.4090906@triad.rr.com> (raw)
In-Reply-To: <C8140D61.145AC%keir.fraser@eu.citrix.com>

Sure. I agree much simpler, but is this blurb in the grep manpage a concern?
-s, --no-messages
Suppress error messages about nonexistent or unreadable files.
Portability note: unlike GNU grep, 7th Edition Unix grep did not
conform to POSIX, because it lacked -q and its -s option behaved
like GNU grep’s -q option. USG-style grep also lacked -q but
its -s option behaved like GNU grep. *Portable shell scripts
should avoid both -q and -s and should redirect standard and
error output to /dev/null instead*. (-s is specified by POSIX.)

I'm not sure where all the xend daemon can run? is it always running on 
linux, thus implying (modern?) GNU grep? The reason I am bringing this 
up is that I recall having grep related issues when running git on 
Solaris (without gnu utilities installed) for this very reason. I will 
re-sumbit accordingly.


Keir Fraser wrote:
> On 15/05/2010 05:16, "Richie" <listmail@triad.rr.com> wrote:
>
>   
>> I'm seeing a grep error during bare metal pvops kernel boot.  In the
>> init script, the previous checks will avoid/perform the /proc/xen mount
>> as appropriate, but then it does a grep on /proc/xen/capabilities
>> without ensuring that /proc/xen is actually mounted.  This is my attempt
>> (read: first patch :) ) to avoid it.
>>     
>
> Richie,
>
> Can you try adding the -s option to grep instead (i.e., grep -qs)? Should be
> a simpler way to achieve the same thing. I'll apply that instead if it works
> okay for you.
>
>  -- Keir
>
>
>   

  reply	other threads:[~2010-05-15 14:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-15  4:16 [PATCH] xend: update init script to avoid grep on non-existent file system Richie
2010-05-15  7:35 ` Keir Fraser
2010-05-15 14:56   ` Richie [this message]
2010-05-15 15:11     ` Keir Fraser
2010-05-15 16:00   ` Richie

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=4BEEB600.4090906@triad.rr.com \
    --to=listmail@triad.rr.com \
    --cc=keir.fraser@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.