]>
Commit | Line | Data |
---|---|---|
2cb7cef9 BS |
1 | From a9860bf05f4cb94f60f8f3459908d5621f75dd06 Mon Sep 17 00:00:00 2001 |
2 | From: Greg Kroah-Hartman <gregkh@suse.de> | |
3 | Date: Wed, 24 Sep 2008 14:46:44 -0700 | |
4 | Subject: [PATCH 02/23] Staging: add TAINT_CRAP flag to drivers/staging modules | |
5 | Patch-mainline: 2.6.28 | |
6 | ||
7 | We need to add a flag for all code that is in the drivers/staging/ | |
8 | directory to prevent all other kernel developers from worrying about | |
9 | issues here, and to notify users that the drivers might not be as good | |
10 | as they are normally used to. | |
11 | ||
12 | Based on code from Andreas Gruenbacher and Jeff Mahoney to provide a | |
13 | TAINT flag for the support level of a kernel module in the Novell | |
14 | enterprise kernel release. | |
15 | ||
16 | This is the code that actually modifies the modules, adding the flag to | |
17 | any files in the drivers/staging directory. | |
18 | ||
19 | Cc: Andreas Gruenbacher <agruen@suse.de> | |
20 | Cc: Jeff Mahoney <jeffm@suse.de> | |
21 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | |
22 | --- | |
23 | scripts/mod/modpost.c | 9 +++++++++ | |
24 | 1 file changed, 9 insertions(+) | |
25 | ||
26 | --- a/scripts/mod/modpost.c | |
27 | +++ b/scripts/mod/modpost.c | |
28 | @@ -1776,6 +1776,14 @@ void add_supported_flag(struct buffer *b | |
29 | buf_printf(b, "\nMODULE_INFO(supported, \"%s\");\n", how); | |
30 | } | |
31 | ||
32 | +void add_staging_flag(struct buffer *b, const char *name) | |
33 | +{ | |
34 | + static const char *staging_dir = "drivers/staging"; | |
35 | + | |
36 | + if (strncmp(staging_dir, name, strlen(staging_dir)) == 0) | |
37 | + buf_printf(b, "\nMODULE_INFO(staging, \"Y\");\n"); | |
38 | +} | |
39 | + | |
40 | /** | |
41 | * Record CRCs for unresolved symbols | |
42 | **/ | |
43 | @@ -2199,6 +2207,7 @@ int main(int argc, char **argv) | |
44 | buf.pos = 0; | |
45 | ||
46 | add_header(&buf, mod); | |
47 | + add_staging_flag(&buf, mod->name); | |
48 | add_supported_flag(&buf, mod); | |
49 | err |= add_versions(&buf, mod); | |
50 | add_depends(&buf, mod, modules); |