uart(3) with the old fix, devuart.c with the removed 't' and portdat.h had the Uart structure, where dcdts is removed. Notes: Tue Jan 24 09:34:18 EST 2006 rsc I applied the code change to the kernel. You're still breaking the man page. All the font lines are correct as they are. uart.orig:22,30 - /n/sources/patch/uart-update-again/uart:22,32 is accessed through .BI eia n (the data file), - .BI eia n ctl + .BI eia n + .I ctl (the control file), and - .BI eia n status + .BI eia n + .I status (the read-only status file). Reads of the data file will block until at least one byte is available. The The control file is really .BI eia n ctl which formats the same as \fBeia\fIn\fBctl. What you have will format like (ignoring the fonts) "eian ctl", with an extra space. It accepts the following commands: .TP - .BI b n + .B b n Set the baud rate to .IR n . This is okay the way it was too. The "n" is a parameter, not a literal n, so it should be in I font, not B font. If you were trying to put in a space, you would use .B b\fI n (what follows .TP has to be one input line), but again here the space is incorrect. The control message is just "b1", not "b 1" (that's two different messages!). Russ Reference: /n/sources/patch/sorry/uart-update-again Date: Tue Jan 24 09:32:57 CET 2006 Reviewed-by: rsc --- /sys/man/3/uart Tue Jan 24 09:31:47 2006 +++ /sys/man/3/uart Tue Jan 24 09:31:43 2006 @@ -22,9 +22,11 @@ is accessed through .BI eia n (the data file), -.BI eia n ctl +.BI eia n +.I ctl (the control file), and -.BI eia n status +.BI eia n +.I status (the read-only status file). Reads of the data file will block until at least one byte is available. The @@ -32,34 +34,33 @@ configures the port. It accepts the following commands: .TP -.BI b n +.B b n Set the baud rate to .IR n . .TP -.BI d n +.B c n +Do hangup on DCD if +.I n +is non-zero; else clear it. +.TP +.B d n Set DTR if .I n is non-zero; else clear it. .TP -.BI k n -Send a break lasting +.B e n +Do hangup on DSR if .I n -milliseconds. +is non-zero; else clear it. .TP -.BI r n -Set RTS if -.I n -is non-zero; -else clear it. +.B f +Flush output queue. .TP -.BI m n -Obey modem CTS signal if -.I n -is non-zero; -else clear it. +.B h +Hangup input and output queue. .TP -.BI i n +.B i n Enable/disable the FIFOs. If .I n @@ -75,7 +76,26 @@ .I n causes the maximum-supported trigger level to be set. .TP -.BI p c +.B k n +Send a break lasting +.I n +milliseconds. +.TP +.B l n +Set number of bits per byte to +.IR n . +Legal values are 5, 6, 7, or 8. +.TP +.B m n +Obey modem CTS signal if +.I n +is non-zero; +else clear it. +.TP +.B n +Turn off blocking on read. +.TP +.B p c Set parity to odd if .I c is @@ -86,17 +106,22 @@ .BR e ; else set no parity. .TP -.BI s n -Set number of stop bits to +.B q n +Set queue limit to .IR n . -Legal values are 1 or 2. .TP -.BI l n -Set number of bits per byte to +.B r n +Set RTS if +.I n +is non-zero; +else clear it. +.TP +.B s n +Set number of stop bits to .IR n . -Legal values are 5, 6, 7, or 8. +Legal values are 1 or 2. .TP -.BI w n +.B w n Set the uart clock timer to n times 100us. .IP --- /sys/src/9/port/devuart.c Tue Jan 24 09:32:08 2006 +++ /sys/src/9/port/devuart.c Tue Jan 24 09:32:03 2006 @@ -458,10 +458,6 @@ if((*p->phys->stop)(p, n) < 0) return -1; break; - case 'T': - case 't': - p->dcdts = n; - break; case 'W': case 'w': if(uarttimer == nil || n < 1) --- /sys/src/9/port/portdat.h Tue Jan 24 09:32:35 2006 +++ /sys/src/9/port/portdat.h Tue Jan 24 09:32:28 2006 @@ -888,7 +888,7 @@ int modem; /* hardware flow control on */ int xonoff; /* software flow control on */ int blocked; - int cts, dsr, dcd, dcdts; /* keep track of modem status */ + int cts, dsr, dcd; /* keep track of modem status */ int ctsbackoff; int hup_dsr, hup_dcd; /* send hangup upstream? */ int dohup;