diff options
author | David Howells <dhowells@redhat.com> | 2013-01-02 10:13:02 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-01-02 20:36:10 -0500 |
commit | 8a7eab2b54b349d005181fd971cfa027b1976c7b (patch) | |
tree | 42ba4b4248c3907d0876097488a5c2b7de53fe92 /scripts | |
parent | 3d33fcc11bdd11b6949cf5c406726a094395dc4f (diff) |
UAPI: Strip _UAPI prefix on header install no matter the whitespace
Commit 56c176c9cac9 ("UAPI: strip the _UAPI prefix from header guards
during header installation") strips the _UAPI prefix from header guards,
but only if there's a single space between the cpp directive and the
label.
Make it more flexible and able to handle tabs and multiple white space
characters.
Signed-off-by: David Howells <dhowell@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/headers_install.pl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/headers_install.pl b/scripts/headers_install.pl index 6c353ae8a451..581ca99c96f2 100644 --- a/scripts/headers_install.pl +++ b/scripts/headers_install.pl | |||
@@ -42,9 +42,9 @@ foreach my $filename (@files) { | |||
42 | $line =~ s/(^|\s)(inline)\b/$1__$2__/g; | 42 | $line =~ s/(^|\s)(inline)\b/$1__$2__/g; |
43 | $line =~ s/(^|\s)(asm)\b(\s|[(]|$)/$1__$2__$3/g; | 43 | $line =~ s/(^|\s)(asm)\b(\s|[(]|$)/$1__$2__$3/g; |
44 | $line =~ s/(^|\s|[(])(volatile)\b(\s|[(]|$)/$1__$2__$3/g; | 44 | $line =~ s/(^|\s|[(])(volatile)\b(\s|[(]|$)/$1__$2__$3/g; |
45 | $line =~ s/#ifndef _UAPI/#ifndef /; | 45 | $line =~ s/#ifndef\s+_UAPI/#ifndef /; |
46 | $line =~ s/#define _UAPI/#define /; | 46 | $line =~ s/#define\s+_UAPI/#define /; |
47 | $line =~ s!#endif /[*] _UAPI!#endif /* !; | 47 | $line =~ s!#endif\s+/[*]\s*_UAPI!#endif /* !; |
48 | printf {$out} "%s", $line; | 48 | printf {$out} "%s", $line; |
49 | } | 49 | } |
50 | close $out; | 50 | close $out; |