]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/suse-2.6.27.25/patches.drivers/0002-Staging-add-TAINT_CRAP-flag-to-drivers-staging-modu.patch
Reenabled linux-xen and xen-image build
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.25 / patches.drivers / 0002-Staging-add-TAINT_CRAP-flag-to-drivers-staging-modu.patch
CommitLineData
00e5a55c
BS
1From a9860bf05f4cb94f60f8f3459908d5621f75dd06 Mon Sep 17 00:00:00 2001
2From: Greg Kroah-Hartman <gregkh@suse.de>
3Date: Wed, 24 Sep 2008 14:46:44 -0700
4Subject: [PATCH 02/23] Staging: add TAINT_CRAP flag to drivers/staging modules
5Patch-mainline: 2.6.28
6
7We need to add a flag for all code that is in the drivers/staging/
8directory to prevent all other kernel developers from worrying about
9issues here, and to notify users that the drivers might not be as good
10as they are normally used to.
11
12Based on code from Andreas Gruenbacher and Jeff Mahoney to provide a
13TAINT flag for the support level of a kernel module in the Novell
14enterprise kernel release.
15
16This is the code that actually modifies the modules, adding the flag to
17any files in the drivers/staging directory.
18
19Cc: Andreas Gruenbacher <agruen@suse.de>
20Cc: Jeff Mahoney <jeffm@suse.de>
21Signed-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);