Author: glen Date: Mon Aug 30 18:24:02 2010 GMT Module: packages Tag: HEAD ---- Log message: - re-add for 2.6.35 raw from http://download.opensuse.org/update/11.2/rpm/src/kernel-source-2.6.31.12-0.2.1.src.rpm from patches.fixes.tar.bz2 from patches.fixes/tiocgdev
---- Files affected: packages/kernel: kernel-TIOCGDEV.patch (1.2 -> 1.3) ---- Diffs: ================================================================ Index: packages/kernel/kernel-TIOCGDEV.patch diff -u /dev/null packages/kernel/kernel-TIOCGDEV.patch:1.3 --- /dev/null Mon Aug 30 20:24:02 2010 +++ packages/kernel/kernel-TIOCGDEV.patch Mon Aug 30 20:23:57 2010 @@ -0,0 +1,154 @@ +Subject: tiocgdev ioctl +Patch-mainline: never, lkml guys don't like it +From: [email protected] + +add tty ioctl to figure physical device of the console. + + arch/alpha/include/asm/ioctls.h | 1 + + arch/arm/include/asm/ioctls.h | 1 + + arch/ia64/include/asm/ioctls.h | 1 + + arch/m68k/include/asm/ioctls.h | 1 + + arch/mips/include/asm/ioctls.h | 1 + + arch/powerpc/include/asm/ioctls.h | 1 + + arch/s390/include/asm/ioctls.h | 1 + + arch/sh/include/asm/ioctls.h | 1 + + arch/sparc/include/asm/ioctls.h | 1 + + arch/x86/include/asm/ioctls.h | 1 + + drivers/char/tty_io.c | 15 +++++++++++++++ + fs/compat_ioctl.c | 1 + + 12 files changed, 26 insertions(+) + +--- a/arch/alpha/include/asm/ioctls.h ++++ b/arch/alpha/include/asm/ioctls.h +@@ -91,6 +91,7 @@ + #define TIOCGSID 0x5429 /* Return the session ID of FD */ + #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ + #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ ++#define TIOCGDEV _IOR('T',0x32, unsigned int) /* Get real dev no below /dev/console */ + + #define TIOCSERCONFIG 0x5453 + #define TIOCSERGWILD 0x5454 +--- a/arch/arm/include/asm/ioctls.h ++++ b/arch/arm/include/asm/ioctls.h +@@ -52,6 +52,7 @@ + #define TCSETSF2 _IOW('T',0x2D, struct termios2) + #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ + #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ ++#define TIOCGDEV _IOR('T',0x32, unsigned int) /* Get real dev no below /dev/console */ + + #define FIONCLEX 0x5450 /* these numbers need to be adjusted. */ + #define FIOCLEX 0x5451 +--- a/arch/ia64/include/asm/ioctls.h ++++ b/arch/ia64/include/asm/ioctls.h +@@ -59,6 +59,7 @@ + #define TCSETSF2 _IOW('T',0x2D, struct termios2) + #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ + #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ ++#define TIOCGDEV _IOR('T',0x32, unsigned int) /* Get real dev no below /dev/console */ + + #define FIONCLEX 0x5450 /* these numbers need to be adjusted. */ + #define FIOCLEX 0x5451 +--- a/arch/m68k/include/asm/ioctls.h ++++ b/arch/m68k/include/asm/ioctls.h +@@ -52,6 +52,7 @@ + #define TCSETSF2 _IOW('T',0x2D, struct termios2) + #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ + #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ ++#define TIOCGDEV _IOR('T',0x32, unsigned int) /* Get real dev no below /dev/console */ + + #define FIONCLEX 0x5450 /* these numbers need to be adjusted. */ + #define FIOCLEX 0x5451 +--- a/arch/mips/include/asm/ioctls.h ++++ b/arch/mips/include/asm/ioctls.h +@@ -83,6 +83,7 @@ + #define TCSETSF2 _IOW('T', 0x2D, struct termios2) + #define TIOCGPTN _IOR('T', 0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ + #define TIOCSPTLCK _IOW('T', 0x31, int) /* Lock/unlock Pty */ ++#define TIOCGDEV _IOR('T', 0x32, unsigned int) /* Get real dev no below /dev/console */ + + /* I hope the range from 0x5480 on is free ... */ + #define TIOCSCTTY 0x5480 /* become controlling tty */ +--- a/arch/powerpc/include/asm/ioctls.h ++++ b/arch/powerpc/include/asm/ioctls.h +@@ -93,6 +93,7 @@ + #define TIOCSRS485 0x542f + #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ + #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ ++#define TIOCGDEV _IOR('T',0x32, unsigned int) /* Get real dev no below /dev/console */ + + #define TIOCSERCONFIG 0x5453 + #define TIOCSERGWILD 0x5454 +--- a/arch/s390/include/asm/ioctls.h ++++ b/arch/s390/include/asm/ioctls.h +@@ -60,6 +60,7 @@ + #define TCSETSF2 _IOW('T',0x2D, struct termios2) + #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ + #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ ++#define TIOCGDEV _IOR('T',0x32, unsigned int) /* Get real dev no below /dev/console */ + + #define FIONCLEX 0x5450 /* these numbers need to be adjusted. */ + #define FIOCLEX 0x5451 +--- a/arch/sh/include/asm/ioctls.h ++++ b/arch/sh/include/asm/ioctls.h +@@ -84,6 +84,7 @@ + #define TCSETSF2 _IOW('T', 45, struct termios2) + #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ + #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ ++#define TIOCGDEV _IOR('T',0x32, unsigned int) /* Get real dev no below /dev/console */ + + #define TIOCSERCONFIG _IO('T', 83) /* 0x5453 */ + #define TIOCSERGWILD _IOR('T', 84, int) /* 0x5454 */ +--- a/arch/sparc/include/asm/ioctls.h ++++ b/arch/sparc/include/asm/ioctls.h +@@ -19,6 +19,7 @@ + #define TCSETS2 _IOW('T', 13, struct termios2) + #define TCSETSW2 _IOW('T', 14, struct termios2) + #define TCSETSF2 _IOW('T', 15, struct termios2) ++#define TIOCGDEV _IOR('T',0x32, unsigned int) /* Get real dev no below /dev/console */ + + /* Note that all the ioctls that are not available in Linux have a + * double underscore on the front to: a) avoid some programs to +--- a/arch/x86/include/asm/ioctls.h ++++ b/arch/x86/include/asm/ioctls.h +@@ -56,6 +56,7 @@ + #define TIOCGPTN _IOR('T', 0x30, unsigned int) + /* Get Pty Number (of pty-mux device) */ + #define TIOCSPTLCK _IOW('T', 0x31, int) /* Lock/unlock Pty */ ++#define TIOCGDEV _IOR('T', 0x32, unsigned int) /* Get real dev no below /dev/console */ + #define TCGETX 0x5432 /* SYS5 TCGETX compatibility */ + #define TCSETX 0x5433 + #define TCSETXF 0x5434 +--- a/drivers/char/tty_io.c ++++ b/drivers/char/tty_io.c +@@ -2507,6 +2507,21 @@ long tty_ioctl(struct file *file, unsign + case TIOCSETD: + return tiocsetd(tty, p); + /* ++ * Without the real device to which /dev/console is connected, ++ * blogd can not work. ++ * blogd spawns a pty/tty pair, ++ * set /dev/console to the tty of that pair (ioctl TIOCCONS), ++ * then reads in all input from the current /dev/console, ++ * buffer or write the readed data to /var/log/boot.msg ++ * _and_ to the original real device. ++ */ ++ case TIOCGDEV: ++ { ++ unsigned int ret = new_encode_dev(tty_devnum(real_tty)); ++ return put_user(ret, (unsigned int __user *)p); ++ } ++ ++ /* + * Break handling + */ + case TIOCSBRK: /* Turn break on, unconditionally */ +--- a/fs/compat_ioctl.c ++++ b/fs/compat_ioctl.c +@@ -1866,6 +1866,7 @@ COMPATIBLE_IOCTL(TCSETSW) + COMPATIBLE_IOCTL(TCSETSF) + COMPATIBLE_IOCTL(TIOCLINUX) + COMPATIBLE_IOCTL(TIOCSBRK) ++COMPATIBLE_IOCTL(TIOCGDEV) + COMPATIBLE_IOCTL(TIOCCBRK) + ULONG_IOCTL(TIOCMIWAIT) + COMPATIBLE_IOCTL(TIOCGICOUNT) ================================================================ ---- CVS-web: http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/kernel/kernel-TIOCGDEV.patch?r1=1.2&r2=1.3&f=u _______________________________________________ pld-cvs-commit mailing list [email protected] http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
