PERFORCE change 147295 for review
    Ed Schouten 
    ed at FreeBSD.org
       
    Wed Aug 13 13:26:45 UTC 2008
    
    
  
http://perforce.freebsd.org/chv.cgi?CH=147295
Change 147295 by ed at 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 ||
    
    
More information about the p4-projects
mailing list