patch-2.1.66 linux/drivers/char/tty_ioctl.c

Next file: linux/drivers/pci/pci.c
Previous file: linux/drivers/char/tty_io.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.65/linux/drivers/char/tty_ioctl.c linux/drivers/char/tty_ioctl.c
@@ -509,18 +509,15 @@
 				tty->packet = 0;
 			return 0;
 		}
-		/* These two ioctl's always return success; even if */
-		/* the driver doesn't support them. */
-		case TCSBRK: case TCSBRKP:
-			retval = tty_check_change(tty);
+		case TIOCGSOFTCAR:
+			return put_user(C_CLOCAL(tty) ? 1 : 0, (int *) arg);
+		case TIOCSSOFTCAR:
+			retval = get_user(arg, (unsigned int *) arg);
 			if (retval)
 				return retval;
-			tty_wait_until_sent(tty, 0);
-			if (signal_pending(current))
-				return -EINTR;
-			if (!tty->driver.ioctl)
-				return 0;
-			tty->driver.ioctl(tty, file, cmd, arg);
+			tty->termios->c_cflag =
+				((tty->termios->c_cflag & ~CLOCAL) |
+				 (arg ? CLOCAL : 0));
 			return 0;
 		default:
 			return -ENOIOCTLCMD;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov