panic.c (f0eef25339f92f7cd4aeea23d9ae97987a5a1e82) panic.c (34f5a39899f3f3e815da64f48ddb72942d86c366)
1/*
2 * linux/kernel/panic.c
3 *
4 * Copyright (C) 1991, 1992 Linus Torvalds
5 */
6
7/*
8 * This function is used through-out the kernel (including mm and fs)

--- 136 unchanged lines hidden (view full) ---

145 * print_tainted - return a string to represent the kernel taint state.
146 *
147 * 'P' - Proprietary module has been loaded.
148 * 'F' - Module has been forcibly loaded.
149 * 'S' - SMP with CPUs not designed for SMP.
150 * 'R' - User forced a module unload.
151 * 'M' - Machine had a machine check experience.
152 * 'B' - System has hit bad_page.
1/*
2 * linux/kernel/panic.c
3 *
4 * Copyright (C) 1991, 1992 Linus Torvalds
5 */
6
7/*
8 * This function is used through-out the kernel (including mm and fs)

--- 136 unchanged lines hidden (view full) ---

145 * print_tainted - return a string to represent the kernel taint state.
146 *
147 * 'P' - Proprietary module has been loaded.
148 * 'F' - Module has been forcibly loaded.
149 * 'S' - SMP with CPUs not designed for SMP.
150 * 'R' - User forced a module unload.
151 * 'M' - Machine had a machine check experience.
152 * 'B' - System has hit bad_page.
153 * 'U' - Userspace-defined naughtiness.
153 *
154 * The string is overwritten by the next call to print_taint().
155 */
156
157const char *print_tainted(void)
158{
159 static char buf[20];
160 if (tainted) {
154 *
155 * The string is overwritten by the next call to print_taint().
156 */
157
158const char *print_tainted(void)
159{
160 static char buf[20];
161 if (tainted) {
161 snprintf(buf, sizeof(buf), "Tainted: %c%c%c%c%c%c",
162 snprintf(buf, sizeof(buf), "Tainted: %c%c%c%c%c%c%c",
162 tainted & TAINT_PROPRIETARY_MODULE ? 'P' : 'G',
163 tainted & TAINT_FORCED_MODULE ? 'F' : ' ',
164 tainted & TAINT_UNSAFE_SMP ? 'S' : ' ',
165 tainted & TAINT_FORCED_RMMOD ? 'R' : ' ',
166 tainted & TAINT_MACHINE_CHECK ? 'M' : ' ',
163 tainted & TAINT_PROPRIETARY_MODULE ? 'P' : 'G',
164 tainted & TAINT_FORCED_MODULE ? 'F' : ' ',
165 tainted & TAINT_UNSAFE_SMP ? 'S' : ' ',
166 tainted & TAINT_FORCED_RMMOD ? 'R' : ' ',
167 tainted & TAINT_MACHINE_CHECK ? 'M' : ' ',
167 tainted & TAINT_BAD_PAGE ? 'B' : ' ');
168 tainted & TAINT_BAD_PAGE ? 'B' : ' ',
169 tainted & TAINT_USER ? 'U' : ' ');
168 }
169 else
170 snprintf(buf, sizeof(buf), "Not tainted");
171 return(buf);
172}
173
174void add_taint(unsigned flag)
175{

--- 109 unchanged lines hidden ---
170 }
171 else
172 snprintf(buf, sizeof(buf), "Not tainted");
173 return(buf);
174}
175
176void add_taint(unsigned flag)
177{

--- 109 unchanged lines hidden ---