public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
From: John Kacur <jkacur@redhat.com>
To: Steven Rostedt <srostedt@redhat.com>
Cc: "Mike Frysinger" <vapier@gentoo.org>,
	"Américo Wang" <xiyou.wangcong@gmail.com>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org
Subject: Re: [PATCH] kconfig: dont hardcode path to lsmod
Date: Tue, 19 Jan 2010 18:37:43 +0100 (CET)	[thread overview]
Message-ID: <alpine.LFD.2.00.1001191833040.5999@localhost.localdomain> (raw)
In-Reply-To: <1263919075.2737.134.camel@localhost.localdomain>



On Tue, 19 Jan 2010, Steven Rostedt wrote:

> On Tue, 2010-01-19 at 17:29 +0100, John Kacur wrote:
> 
> > diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl
> > index 0d80082..1803d2e 100644
> > --- a/scripts/kconfig/streamline_config.pl
> > +++ b/scripts/kconfig/streamline_config.pl
> > @@ -238,7 +238,8 @@ foreach my $makefile (@makefiles) {
> >  my %modules;
> >  
> >  # see what modules are loaded on this system
> > -open(LIN,"/sbin/lsmod|") || die "Cant lsmod";
> > +# If lsmod isn't in the sbin dir, check if it is in the path
> > +open(LIN,"/sbin/lsmod|") || open(LIN,"lsmod|") || die "Cant lsmod";
> 
> I've tried this before, but it gives an error that the "|" pipe failed.
> 
> -- Steve
> 
> 
> >  while (<LIN>) {
> >  	next if (/^Module/);  # Skip the first line.
> >  	if (/^(\S+)/) {
> 
> 

Are you sure? It works for my test toy program.
First tested with the hardcoded path, and then giving a nonsense name 
instead of sbin so that it uses the PATH variable.

John

  reply	other threads:[~2010-01-19 17:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-19  6:52 [PATCH] kconfig: dont hardcode path to lsmod Mike Frysinger
2010-01-19 14:10 ` Steven Rostedt
2010-01-19 14:25 ` Américo Wang
     [not found]   ` <520f0cf11001190822t6d3221bco20739d586608bfde@mail.gmail.com>
2010-01-19 16:29     ` John Kacur
2010-01-19 16:37       ` Steven Rostedt
2010-01-19 17:37         ` John Kacur [this message]
2010-01-19 17:23   ` Mike Frysinger
2010-01-19 17:38     ` Steven Rostedt
2010-01-19 17:42     ` John Kacur
2010-01-19 17:54       ` Mike Frysinger
2010-01-19 18:12         ` John Kacur
2010-01-19 19:18           ` Mike Frysinger
2010-01-20  3:16             ` Américo Wang

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=alpine.LFD.2.00.1001191833040.5999@localhost.localdomain \
    --to=jkacur@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=srostedt@redhat.com \
    --cc=vapier@gentoo.org \
    --cc=xiyou.wangcong@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox