diff options
| author | Andi Kleen <ak@suse.de> | 2007-05-02 13:27:21 -0400 |
|---|---|---|
| committer | Andi Kleen <andi@basil.nowhere.org> | 2007-05-02 13:27:21 -0400 |
| commit | a106009bdfa12b6452b724cc0718ca8e1334745d (patch) | |
| tree | f42d70dff689aec8d3c2494deb4dd3a438b7f03d | |
| parent | c812d6c198c5f39a6ea22a9a12d518cd3714af16 (diff) | |
[PATCH] x86-64: Print type and size correctly for unknown compat ioctls
Signed-off-by: Andi Kleen <ak@suse.de>
| -rw-r--r-- | fs/compat.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/compat.c b/fs/compat.c index 040a8be38a48..72e5e6923828 100644 --- a/fs/compat.c +++ b/fs/compat.c | |||
| @@ -371,13 +371,14 @@ static void compat_ioctl_error(struct file *filp, unsigned int fd, | |||
| 371 | fn = "?"; | 371 | fn = "?"; |
| 372 | } | 372 | } |
| 373 | 373 | ||
| 374 | sprintf(buf,"'%c'", (cmd>>24) & 0x3f); | 374 | sprintf(buf,"'%c'", (cmd>>_IOC_TYPESHIFT) & _IOC_TYPEMASK); |
| 375 | if (!isprint(buf[1])) | 375 | if (!isprint(buf[1])) |
| 376 | sprintf(buf, "%02x", buf[1]); | 376 | sprintf(buf, "%02x", buf[1]); |
| 377 | compat_printk("ioctl32(%s:%d): Unknown cmd fd(%d) " | 377 | compat_printk("ioctl32(%s:%d): Unknown cmd fd(%d) " |
| 378 | "cmd(%08x){%s} arg(%08x) on %s\n", | 378 | "cmd(%08x){t:%s;sz:%u} arg(%08x) on %s\n", |
| 379 | current->comm, current->pid, | 379 | current->comm, current->pid, |
| 380 | (int)fd, (unsigned int)cmd, buf, | 380 | (int)fd, (unsigned int)cmd, buf, |
| 381 | (cmd >> _IOC_SIZESHIFT) & _IOC_SIZEMASK, | ||
| 381 | (unsigned int)arg, fn); | 382 | (unsigned int)arg, fn); |
| 382 | 383 | ||
| 383 | if (path) | 384 | if (path) |
