From e10cc1df1d2014f68a4bdcf73f6dd122c4561f94 Mon Sep 17 00:00:00 2001 From: Paul Fulghum Date: Thu, 10 May 2007 22:22:50 -0700 Subject: tty: add compat_ioctl Add compat_ioctl method for tty code to allow processing of 32 bit ioctl calls on 64 bit systems by tty core, tty drivers, and line disciplines. Based on patch by Arnd Bergmann: http://www.uwsg.iu.edu/hypermail/linux/kernel/0511.0/1732.html [akpm@linux-foundation.org: make things static] Signed-off-by: Paul Fulghum Acked-by: Arnd Bergmann Cc: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/tty_ldisc.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/linux/tty_ldisc.h') diff --git a/include/linux/tty_ldisc.h b/include/linux/tty_ldisc.h index d75932e27710..6226504d9108 100644 --- a/include/linux/tty_ldisc.h +++ b/include/linux/tty_ldisc.h @@ -59,6 +59,11 @@ * low-level driver can "grab" an ioctl request before the line * discpline has a chance to see it. * + * long (*compat_ioctl)(struct tty_struct * tty, struct file * file, + * unsigned int cmd, unsigned long arg); + * + * Process ioctl calls from 32-bit process on 64-bit system + * * void (*set_termios)(struct tty_struct *tty, struct ktermios * old); * * This function notifies the line discpline that a change has @@ -118,6 +123,8 @@ struct tty_ldisc { const unsigned char * buf, size_t nr); int (*ioctl)(struct tty_struct * tty, struct file * file, unsigned int cmd, unsigned long arg); + long (*compat_ioctl)(struct tty_struct * tty, struct file * file, + unsigned int cmd, unsigned long arg); void (*set_termios)(struct tty_struct *tty, struct ktermios * old); unsigned int (*poll)(struct tty_struct *, struct file *, struct poll_table_struct *); -- cgit v1.2.3-59-g8ed1b