packages (LINUX_2_6_27): kernel/kernel-TIOCGDEV.patch - updated from suse...

glen glen at pld-linux.org
Mon Aug 30 20:54:10 CEST 2010


Author: glen                         Date: Mon Aug 30 18:54:10 2010 GMT
Module: packages                      Tag: LINUX_2_6_27
---- Log message:
- updated from
  suse < kernel-source-2.6.27.48-0.2.1.src.rpm < patches.fixes.tar.bz2 < patches.fixes/tiocgdev

---- Files affected:
packages/kernel:
   kernel-TIOCGDEV.patch (1.1 -> 1.1.4.1) 

---- Diffs:

================================================================
Index: packages/kernel/kernel-TIOCGDEV.patch
diff -u packages/kernel/kernel-TIOCGDEV.patch:1.1 packages/kernel/kernel-TIOCGDEV.patch:1.1.4.1
--- packages/kernel/kernel-TIOCGDEV.patch:1.1	Thu Nov  1 15:06:34 2007
+++ packages/kernel/kernel-TIOCGDEV.patch	Mon Aug 30 20:54:05 2010
@@ -4,58 +4,22 @@
 
 add tty ioctl to figure physical device of the console.
 
- drivers/char/tty_io.c        |   15 +++++++++++++++
- fs/compat_ioctl.c            |    1 +
- include/asm-alpha/ioctls.h   |    1 +
- include/asm-arm/ioctls.h     |    1 +
- include/asm-i386/ioctls.h    |    1 +
- include/asm-ia64/ioctls.h    |    1 +
- include/asm-m68k/ioctls.h    |    1 +
- include/asm-mips/ioctls.h    |    1 +
- include/asm-powerpc/ioctls.h |    1 +
- include/asm-s390/ioctls.h    |    1 +
- include/asm-sh/ioctls.h      |    1 +
- include/asm-sparc/ioctls.h   |    1 +
- include/asm-sparc64/ioctls.h |    1 +
- include/asm-x86_64/ioctls.h  |    1 +
- 14 files changed, 28 insertions(+)
+ arch/alpha/include/asm/ioctls.h   |    1 +
+ arch/arm/include/asm/ioctls.h     |    1 +
+ arch/ia64/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 +
+ drivers/char/tty_io.c             |   15 +++++++++++++++
+ fs/compat_ioctl.c                 |    1 +
+ include/asm-m68k/ioctls.h         |    1 +
+ include/asm-mips/ioctls.h         |    1 +
+ include/asm-x86/ioctls.h          |    1 +
+ 12 files changed, 26 insertions(+)
 
---- a/drivers/char/tty_io.c	2007-07-08 19:32:17.000000000 -0400
-+++ b/drivers/char/tty_io.c	2007-08-27 14:02:21.000000000 -0400
-@@ -3354,6 +3354,21 @@ int tty_ioctl(struct inode * inode, stru
- 			return tioclinux(tty, arg);
- #endif
- 		/*
-+		 * 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	2007-07-08 19:32:17.000000000 -0400
-+++ b/fs/compat_ioctl.c	2007-08-27 14:01:21.000000000 -0400
-@@ -2451,6 +2451,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)
---- a/include/asm-alpha/ioctls.h	2007-07-08 19:32:17.000000000 -0400
-+++ b/include/asm-alpha/ioctls.h	2007-08-27 14:01:21.000000000 -0400
+--- 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) */
@@ -64,8 +28,8 @@
  
  #define TIOCSERCONFIG	0x5453
  #define TIOCSERGWILD	0x5454
---- a/include/asm-arm/ioctls.h	2007-07-08 19:32:17.000000000 -0400
-+++ b/include/asm-arm/ioctls.h	2007-08-27 14:01:21.000000000 -0400
+--- 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) */
@@ -74,48 +38,18 @@
  
  #define FIONCLEX	0x5450  /* these numbers need to be adjusted. */
  #define FIOCLEX		0x5451
---- a/include/asm-i386/ioctls.h	2007-07-08 19:32:17.000000000 -0400
-+++ b/include/asm-i386/ioctls.h	2007-08-27 14:01:21.000000000 -0400
-@@ -53,6 +53,7 @@
+--- 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
- #define FIOCLEX		0x5451
---- a/include/asm-ia64/ioctls.h	2007-07-08 19:32:17.000000000 -0400
-+++ b/include/asm-ia64/ioctls.h	2007-08-27 14:01:21.000000000 -0400
-@@ -55,6 +55,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 FIONCLEX	0x5450  /* these numbers need to be adjusted. */
- #define FIOCLEX		0x5451
---- a/include/asm-m68k/ioctls.h	2007-07-08 19:32:17.000000000 -0400
-+++ b/include/asm-m68k/ioctls.h	2007-08-27 14:01:21.000000000 -0400
-@@ -48,6 +48,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 FIONCLEX	0x5450  /* these numbers need to be adjusted. */
  #define FIOCLEX		0x5451
---- a/include/asm-mips/ioctls.h	2007-07-08 19:32:17.000000000 -0400
-+++ b/include/asm-mips/ioctls.h	2007-08-27 14:01:21.000000000 -0400
-@@ -79,6 +79,7 @@
- #define TIOCGSID	0x7416  /* 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 */
- 
- /* I hope the range from 0x5480 on is free ... */
- #define TIOCSCTTY	0x5480		/* become controlling tty */
---- a/include/asm-powerpc/ioctls.h	2007-07-08 19:32:17.000000000 -0400
-+++ b/include/asm-powerpc/ioctls.h	2007-08-27 14:01:21.000000000 -0400
+--- a/arch/powerpc/include/asm/ioctls.h
++++ b/arch/powerpc/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) */
@@ -124,48 +58,72 @@
  
  #define TIOCSERCONFIG	0x5453
  #define TIOCSERGWILD	0x5454
---- a/include/asm-s390/ioctls.h	2007-07-08 19:32:17.000000000 -0400
-+++ b/include/asm-s390/ioctls.h	2007-08-27 14:01:21.000000000 -0400
-@@ -56,6 +56,7 @@
- #define TIOCGSID	0x5429  /* Return the session ID of FD */
+--- 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/include/asm-sh/ioctls.h	2007-07-08 19:32:17.000000000 -0400
-+++ b/include/asm-sh/ioctls.h	2007-08-27 14:01:21.000000000 -0400
-@@ -80,6 +80,7 @@
- #define TIOCGSID	_IOR('T', 41, pid_t) /* 0x5429 */ /* Return the session ID of FD */
+--- 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/include/asm-sparc/ioctls.h	2007-07-08 19:32:17.000000000 -0400
-+++ b/include/asm-sparc/ioctls.h	2007-08-27 14:01:21.000000000 -0400
-@@ -15,6 +15,7 @@
- #define TCSETS		_IOW('T', 9, struct termios)
- #define TCSETSW		_IOW('T', 10, struct termios)
- #define TCSETSF		_IOW('T', 11, struct termios)
+--- 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/include/asm-sparc64/ioctls.h	2007-07-08 19:32:17.000000000 -0400
-+++ b/include/asm-sparc64/ioctls.h	2007-08-27 14:01:21.000000000 -0400
-@@ -16,6 +16,7 @@
- #define TCSETS		_IOW('T', 9, struct termios)
- #define TCSETSW		_IOW('T', 10, struct termios)
- #define TCSETSF		_IOW('T', 11, struct termios)
-+#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/include/asm-x86_64/ioctls.h	2007-07-08 19:32:17.000000000 -0400
-+++ b/include/asm-x86_64/ioctls.h	2007-08-27 14:01:21.000000000 -0400
+--- a/drivers/char/tty_io.c
++++ b/drivers/char/tty_io.c
+@@ -3031,6 +3031,21 @@ long tty_ioctl(struct file *file, unsign
+ 		return tioclinux(tty, arg);
+ #endif
+ 	/*
++	 * 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
+@@ -1871,6 +1871,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)
+--- a/include/asm-m68k/ioctls.h
++++ b/include/asm-m68k/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) */
@@ -173,4 +131,24 @@
 +#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/include/asm-mips/ioctls.h
++++ b/include/asm-mips/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/include/asm-x86/ioctls.h
++++ b/include/asm-x86/ioctls.h
+@@ -54,6 +54,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 FIONCLEX	0x5450
  #define FIOCLEX		0x5451
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/kernel/kernel-TIOCGDEV.patch?r1=1.1&r2=1.1.4.1&f=u



More information about the pld-cvs-commit mailing list