Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 125431
b: refs/heads/master
c: 7e557a2
h: refs/heads/master
i:
  125429: ed09cb6
  125427: 1e56d27
  125423: 16ffdef
v: v3
  • Loading branch information
Sam Ravnborg committed Jan 2, 2009
1 parent 95c5010 commit d264804
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 46b8af50ba5c072b74740c5fa8ba08e6eabb22f8
refs/heads/master: 7e557a2509f9e1477c10295b74e29e4e93fa2392
11 changes: 10 additions & 1 deletion trunk/scripts/headers_check.pl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#
# 2) It is checked that prototypes does not use "extern"
#
# 3) TODO: check for leaked CONFIG_ symbols
# 3) Check for leaked CONFIG_ symbols

use strict;

Expand All @@ -36,6 +36,7 @@
$lineno++;
check_include();
check_prototypes();
check_config();
}
close FH;
}
Expand Down Expand Up @@ -64,3 +65,11 @@ sub check_prototypes
printf STDERR "$filename:$lineno: extern's make no sense in userspace\n";
}
}

sub check_config
{
if ($line =~ m/[^a-zA-Z0-9_]+CONFIG_([a-zA-Z0-9]+)[^a-zA-Z0-9]/) {
printf STDERR "$filename:$lineno: leaks CONFIG_$1 to userspace where it is not valid\n";
}
}

0 comments on commit d264804

Please sign in to comment.