Re: [PATCH 1/4] localmodconfig: set default value for ksource in streamline_config.pl

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

 



On Thu, 2012-08-09 at 09:23 -0400, Bill Pemberton wrote:
> Running streamline_config.pl as it's shown it in the comment header,
> you will get a warning about $ksource being uninitialized.  This is
> because $ksource is set to ARGV[0], but the examples don't require any
> arguments.  Fix by setting ksource to . if no ARGV[0] is given.
> 
> This also fixes passing a config file to the script.  For example,
> without this is if you run streamline_config.pl . config.old, it will
> ignore config.old and try to read .config anyway.  With this change it
> will read config.old instead of .config -- which appears to be the
> intent of the code.

I have nothing against this change, but I'm confused by how it fixes the
above issue about reading config.old.

Without the patch, passing in both '.' and 'config.old' as parameters,
wouldn't that still set $ksource to '.' and $kconfig to config.old?

Perhaps, it failed for you without passing the '.', which would set
$ksource to config.old. Maybe the real change should be to count the
number of parameters to determine what $kconfig and $ksource get set to?

-- Steve

> 
> Signed-off-by: Bill Pemberton <wfp5p@xxxxxxxxxxxx>
> ---
>  scripts/kconfig/streamline_config.pl | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl
> index 2fbbbc1d..e3687f9 100644
> --- a/scripts/kconfig/streamline_config.pl
> +++ b/scripts/kconfig/streamline_config.pl
> @@ -135,7 +135,7 @@ GetOptions("localmodconfig" => \$localmodconfig,
>  	   "localyesconfig" => \$localyesconfig);
>  
>  # Get the build source and top level Kconfig file (passed in)
> -my $ksource = $ARGV[0];
> +my $ksource = ($ARGV[0] ? $ARGV[0] : '.');
>  my $kconfig = $ARGV[1];
>  my $lsmod_file = $ENV{'LSMOD'};
>  


--
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