summaryrefslogtreecommitdiffstats
path: root/kernel/printk.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1999-01-04 16:03:48 +0000
committerRalf Baechle <ralf@linux-mips.org>1999-01-04 16:03:48 +0000
commit78c388aed2b7184182c08428db1de6c872d815f5 (patch)
tree4b2003b1b4ceb241a17faa995da8dd1004bb8e45 /kernel/printk.c
parenteb7a5bf93aaa4be1d7c6181100ab7639e74d67f7 (diff)
Merge with Linux 2.1.131 and more MIPS goodies.
(Did I mention that CVS is buggy ...)
Diffstat (limited to 'kernel/printk.c')
-rw-r--r--kernel/printk.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/kernel/printk.c b/kernel/printk.c
index 0d8287fef..a333fe18e 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -12,20 +12,12 @@
* Modified for sysctl support, 1/8/97, Chris Horn.
*/
-#include <stdarg.h>
-
-#include <linux/errno.h>
-#include <linux/sched.h>
-#include <linux/kernel.h>
#include <linux/mm.h>
-#include <linux/tty.h>
#include <linux/tty_driver.h>
-#include <linux/smp.h>
#include <linux/smp_lock.h>
#include <linux/console.h>
#include <linux/init.h>
-#include <asm/system.h>
#include <asm/uaccess.h>
#define LOG_BUF_LEN (16384)
@@ -109,7 +101,7 @@ void __init console_setup(char *str, int *ints)
/*
- * Commands to sys_syslog:
+ * Commands to do_syslog:
*
* 0 -- Close the log. Currently a NOP.
* 1 -- Open the log. Currently a NOP.
@@ -121,7 +113,7 @@ void __init console_setup(char *str, int *ints)
* 7 -- Enable printk's to console
* 8 -- Set level of messages printed to console
*/
-asmlinkage int sys_syslog(int type, char * buf, int len)
+int do_syslog(int type, char * buf, int len)
{
unsigned long i, j, count, flags;
int do_clear = 0;
@@ -129,8 +121,6 @@ asmlinkage int sys_syslog(int type, char * buf, int len)
int error = -EPERM;
lock_kernel();
- if ((type != 3) && !capable(CAP_SYS_ADMIN))
- goto out;
error = 0;
switch (type) {
case 0: /* Close log */
@@ -232,6 +222,14 @@ out:
return error;
}
+asmlinkage int sys_syslog(int type, char * buf, int len)
+{
+ if ((type != 3) && !capable(CAP_SYS_ADMIN))
+ return -EPERM;
+ return do_syslog(type, buf, len);
+}
+
+
spinlock_t console_lock;
asmlinkage int printk(const char *fmt, ...)