Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a106009bdfa12b6452b724cc0718ca8e1334745d
Commit:     a106009bdfa12b6452b724cc0718ca8e1334745d
Parent:     c812d6c198c5f39a6ea22a9a12d518cd3714af16
Author:     Andi Kleen <[EMAIL PROTECTED]>
AuthorDate: Wed May 2 19:27:21 2007 +0200
Committer:  Andi Kleen <[EMAIL PROTECTED]>
CommitDate: Wed May 2 19:27:21 2007 +0200

    [PATCH] x86-64: Print type and size correctly for unknown compat ioctls
    
    Signed-off-by: Andi Kleen <[EMAIL PROTECTED]>
---
 fs/compat.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/fs/compat.c b/fs/compat.c
index 040a8be..72e5e69 100644
--- a/fs/compat.c
+++ b/fs/compat.c
@@ -371,13 +371,14 @@ static void compat_ioctl_error(struct file *filp, 
unsigned int fd,
                        fn = "?";
        }
 
-       sprintf(buf,"'%c'", (cmd>>24) & 0x3f);
+       sprintf(buf,"'%c'", (cmd>>_IOC_TYPESHIFT) & _IOC_TYPEMASK);
        if (!isprint(buf[1]))
                sprintf(buf, "%02x", buf[1]);
        compat_printk("ioctl32(%s:%d): Unknown cmd fd(%d) "
-                       "cmd(%08x){%s} arg(%08x) on %s\n",
+                       "cmd(%08x){t:%s;sz:%u} arg(%08x) on %s\n",
                        current->comm, current->pid,
                        (int)fd, (unsigned int)cmd, buf,
+                       (cmd >> _IOC_SIZESHIFT) & _IOC_SIZEMASK,
                        (unsigned int)arg, fn);
 
        if (path)
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to