Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Aug 2008 13:26:44 GMT
From:      Ed Schouten <ed@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 147295 for review
Message-ID:  <200808131326.m7DDQifJ042844@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=147295

Change 147295 by ed@ed_mekker on 2008/08/13 13:26:12

	Set c_ispeed equal to c_ospeed when zero. Silly POSIX rules.

Affected files ...

.. //depot/projects/mpsafetty/sys/kern/tty.c#21 edit

Differences ...

==== //depot/projects/mpsafetty/sys/kern/tty.c#21 (text+ko) ====

@@ -1324,6 +1324,14 @@
 	case TIOCSETAF: {
 		struct termios *t = data;
 
+		/*
+		 * Who makes up these funny rules? According to POSIX,
+		 * input baud rate is set equal to the output baud rate
+		 * when zero.
+		 */
+		if (t->c_ispeed == 0)
+			t->c_ispeed = t->c_ospeed;
+
 		/* Don't allow invalid flags to be set */
 		if ((t->c_iflag & ~TTYSUP_IFLAG) != 0 ||
 		    (t->c_oflag & ~TTYSUP_OFLAG) != 0 ||



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200808131326.m7DDQifJ042844>