Commit f3ce0064 authored by Randy Dunlap's avatar Randy Dunlap Committed by Ingo Molnar

[PATCH] move console_loglevel scalars to array (resend)

Moves console_loglevel & friends to an array, as sysctl expects.
parent 0b319ed0
......@@ -237,11 +237,6 @@ the different loglevels.
console_loglevel can be set
- default_console_loglevel: default value for console_loglevel
Note: a quick look in linux/kernel/printk.c will reveal that
these variables aren't put inside a structure, so their order
in-core isn't formally guaranteed and garbage values _might_
occur when the compiler changes. (???)
==============================================================
reboot-cmd: (Sparc only)
......
......@@ -28,8 +28,6 @@
extern void die(const char *,struct pt_regs *,long);
extern int console_loglevel;
#ifndef CONFIG_X86_WP_WORKS_OK
/*
* Ugly, ugly, but the goto's result in better assembly..
......
......@@ -26,6 +26,7 @@
#include <linux/kbd_kern.h>
#include <linux/quotaops.h>
#include <linux/smp_lock.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/suspend.h>
#include <linux/writeback.h>
......
......@@ -38,6 +38,13 @@
#define KERN_INFO "<6>" /* informational */
#define KERN_DEBUG "<7>" /* debug-level messages */
extern int console_printk[];
#define console_loglevel (console_printk[0])
#define default_message_loglevel (console_printk[1])
#define minimum_console_loglevel (console_printk[2])
#define default_console_loglevel (console_printk[3])
struct completion;
#ifdef CONFIG_DEBUG_SPINLOCK_SLEEP
......@@ -81,8 +88,6 @@ extern int session_of_pgrp(int pgrp);
asmlinkage int printk(const char * fmt, ...)
__attribute__ ((format (printf, 1, 2)));
extern int console_loglevel;
static inline void console_silent(void)
{
console_loglevel = 0;
......
......@@ -14,6 +14,7 @@
#include <linux/config.h>
#include <linux/proc_fs.h>
#include <linux/devfs_fs_kernel.h>
#include <linux/kernel.h>
#include <linux/unistd.h>
#include <linux/string.h>
#include <linux/ctype.h>
......
......@@ -16,6 +16,7 @@
* 01Mar01 Andrew Morton <andrewm@uow.edu.au>
*/
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/tty.h>
#include <linux/tty_driver.h>
......@@ -54,11 +55,12 @@
DECLARE_WAIT_QUEUE_HEAD(log_wait);
/* Keep together for sysctl support */
int console_loglevel = DEFAULT_CONSOLE_LOGLEVEL;
int default_message_loglevel = DEFAULT_MESSAGE_LOGLEVEL;
int minimum_console_loglevel = MINIMUM_CONSOLE_LOGLEVEL;
int default_console_loglevel = DEFAULT_CONSOLE_LOGLEVEL;
int console_printk[4] = {
DEFAULT_CONSOLE_LOGLEVEL, /* console_loglevel */
DEFAULT_MESSAGE_LOGLEVEL, /* default_message_loglevel */
MINIMUM_CONSOLE_LOGLEVEL, /* minimum_console_loglevel */
DEFAULT_CONSOLE_LOGLEVEL, /* default_console_loglevel */
};
int oops_in_progress;
......
......@@ -88,7 +88,6 @@ unsigned char software_suspend_enabled = 0;
extern char _text, _etext, _edata, __bss_start, _end;
extern char __nosave_begin, __nosave_end;
extern int console_loglevel;
extern int is_head_of_free_region(struct page *);
/* Locks */
......
......@@ -28,6 +28,7 @@
#include <linux/capability.h>
#include <linux/smp_lock.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/sysrq.h>
#include <linux/highuid.h>
#include <linux/writeback.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment