summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2006-06-12 17:03:58 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-06-12 17:03:58 -0300
commite36b7b260ab8cee00f043cfcd64a4bec046997df (patch)
tree913846b3622e61de82ea0df1478f41372b690565
parent0084925ab2ec9585c768fedce4c6ea0a95f95b64 (diff)
downloadmediapointer-dvb-s2-e36b7b260ab8cee00f043cfcd64a4bec046997df.tar.gz
mediapointer-dvb-s2-e36b7b260ab8cee00f043cfcd64a4bec046997df.tar.bz2
Hex option defaults weren't handled correct in make_kconfig
From: Trent Piepho <xyzzy@speakeasy.org> The regex for int and hex option defaults was only correct for int options, it didn't handle hex characters. The kernel version code was outputing "default n" lines for disabled hex and int options, it should only be done for boolean and tristate options. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rwxr-xr-xv4l/scripts/make_kconfig.pl10
1 files changed, 6 insertions, 4 deletions
diff --git a/v4l/scripts/make_kconfig.pl b/v4l/scripts/make_kconfig.pl
index 0d396c8f4..228e0aa48 100755
--- a/v4l/scripts/make_kconfig.pl
+++ b/v4l/scripts/make_kconfig.pl
@@ -32,7 +32,7 @@ sub add_int($)
{
my $arg=shift;
- exists $config{$arg} or die "Adding unknown int '$arg'";
+ exists $config{$arg} or die "Adding unknown int/hex '$arg'";
$intopt{$arg} = 0;
}
@@ -41,7 +41,7 @@ sub set_int_value($$)
my $key = shift;
my $val = shift;
- exists $intopt{$key} or die "Default for unknown int option '$key'";
+ exists $intopt{$key} or die "Default for unknown int/hex option '$key'";
$intopt{$key} = $val;
}
@@ -124,7 +124,7 @@ sub open_kconfig($$) {
add_int($key);
}
# Get default for int options
- if (m|^\s+default "(\d+)"| && exists $intopt{$key}) {
+ if (m|^\s+default "([[:xdigit:]]+)"| && exists $intopt{$key}) {
set_int_value($key, $1);
}
# Override default for disabled tri/bool options
@@ -138,7 +138,9 @@ sub open_kconfig($$) {
# we need to make sure we've disabled it, and add a bit
# to the help text
if (m|^\s*(---)?help(---)?\s*$| && $disabled) {
- print OUT "\tdefault n\n" unless($default_seen);
+ if(exists $tristate{$key} && !$default_seen) {
+ print OUT "\tdefault n\n";
+ }
print OUT <<"EOF";
depends on VIDEO_KERNEL_VERSION
help