diff options
author | Andi Kleen <ak@suse.de> | 2006-06-26 07:56:52 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-26 13:48:16 -0400 |
commit | bebfa1013eee1d91b3242e5801cc8fbdfaf148ec (patch) | |
tree | d1abf916c29bbb5c312717f57798987268aff9a9 /fs | |
parent | f201611fcecdfa825471dc425ee007997228fae4 (diff) |
[PATCH] x86_64: Add compat_printk and sysctl to turn off compat layer warnings
Sometimes e.g. with crashme the compat layer warnings can be noisy.
Add a way to turn them off by gating all output through compat_printk
that checks a global sysctl. The default is not changed.
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/compat.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/fs/compat.c b/fs/compat.c index 7e7e5bc4f3cf..e31e9cf96647 100644 --- a/fs/compat.c +++ b/fs/compat.c | |||
@@ -55,6 +55,20 @@ | |||
55 | 55 | ||
56 | extern void sigset_from_compat(sigset_t *set, compat_sigset_t *compat); | 56 | extern void sigset_from_compat(sigset_t *set, compat_sigset_t *compat); |
57 | 57 | ||
58 | int compat_log = 1; | ||
59 | |||
60 | int compat_printk(const char *fmt, ...) | ||
61 | { | ||
62 | va_list ap; | ||
63 | int ret; | ||
64 | if (!compat_log) | ||
65 | return 0; | ||
66 | va_start(ap, fmt); | ||
67 | ret = vprintk(fmt, ap); | ||
68 | va_end(ap); | ||
69 | return ret; | ||
70 | } | ||
71 | |||
58 | /* | 72 | /* |
59 | * Not all architectures have sys_utime, so implement this in terms | 73 | * Not all architectures have sys_utime, so implement this in terms |
60 | * of sys_utimes. | 74 | * of sys_utimes. |
@@ -359,7 +373,7 @@ static void compat_ioctl_error(struct file *filp, unsigned int fd, | |||
359 | sprintf(buf,"'%c'", (cmd>>24) & 0x3f); | 373 | sprintf(buf,"'%c'", (cmd>>24) & 0x3f); |
360 | if (!isprint(buf[1])) | 374 | if (!isprint(buf[1])) |
361 | sprintf(buf, "%02x", buf[1]); | 375 | sprintf(buf, "%02x", buf[1]); |
362 | printk("ioctl32(%s:%d): Unknown cmd fd(%d) " | 376 | compat_printk("ioctl32(%s:%d): Unknown cmd fd(%d) " |
363 | "cmd(%08x){%s} arg(%08x) on %s\n", | 377 | "cmd(%08x){%s} arg(%08x) on %s\n", |
364 | current->comm, current->pid, | 378 | current->comm, current->pid, |
365 | (int)fd, (unsigned int)cmd, buf, | 379 | (int)fd, (unsigned int)cmd, buf, |