Message ID | 1344518603-19508-2-git-send-email-wfp5p@virginia.edu (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
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@virginia.edu> > --- > 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Steven Rostedt writes: > > 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? > You're right, I remembered the warning and the bug I encountered, but forgot that this patch only addresses the warning. The problem is that if you do streamline_config.pl . config.old, it doesn't read config.old at all -- it still reads .config.
On Thu, 2012-08-09 at 10:16 -0400, Bill Pemberton wrote: > You're right, I remembered the warning and the bug I encountered, but > forgot that this patch only addresses the warning. > > The problem is that if you do streamline_config.pl . config.old, it > doesn't read config.old at all -- it still reads .config. > OK, I'll take these patches as is, and fix the change log to not talk about that issue. You can send another patch that fixes the issue if you like. I'll queue them up for 3.7. -- Steve -- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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'};
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. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> --- scripts/kconfig/streamline_config.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)