Re: [PATCH] kconfig: dont hardcode path to lsmod

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2010-01-19 at 01:52 -0500, Mike Frysinger wrote:
> The lsmod utility has always been installed into /bin with the newer
> module-init-tools package, so let lsmod be found via PATH instead of
> hardcoding the old modutils /sbin path.
> 
> Signed-off-by: Mike Frysinger <vapier@xxxxxxxxxx>

Thanks Mike, I actually have another patch like this. I was first a bit
nervous about using non hard code, but then perhaps it's OK. I my patch
actually checked the main paths first before choosing the "lsmod". But
maybe that would be the better solution, since it would allow someone to
choose their own lsmod.

Thanks!

-- Steve

> ---
>  scripts/kconfig/streamline_config.pl |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl
> index 0d80082..e1dfc8c 100644
> --- a/scripts/kconfig/streamline_config.pl
> +++ b/scripts/kconfig/streamline_config.pl
> @@ -238,7 +238,7 @@ foreach my $makefile (@makefiles) {
>  my %modules;
>  
>  # see what modules are loaded on this system
> -open(LIN,"/sbin/lsmod|") || die "Cant lsmod";
> +open(LIN,"lsmod|") || die "Cant lsmod";
>  while (<LIN>) {
>  	next if (/^Module/);  # Skip the first line.
>  	if (/^(\S+)/) {

--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux