Please try a snapshot - stty issue

Peter Rehley peter@rehley.net
Fri Sep 9 02:28:00 GMT 2005


Hi,

I tried stty on snapshot 20050908 and I still get an error message:

stty -F /dev/ttyS0 9600 ; # Different baud then current baud.
stty: /dev/ttyS0: unable to perform all requested operations.

If I issue the same command a second time I get no error message.

I've traced the problem to /usr/include/sys/termios.h in the  
cfsetispeek and cfsetospeed macros.  These set c_ispeed and c_ospeed  
values to set the baud rate, but the baud rate is also stored in  
c_cflag, and that value is not being set by these macros.  It gets  
set when tcgetattr is called.

When stty does a compare to see if the change was successfull it sees  
the original c_cflag and compares to the changed c_cflag and finds  
that they are different and issues the error message.... actually it  
does a simply memory compare, but these c_cflag values are different.

One fix would be to change the macros so that they set the baud rate  
i  c_cflag...of course stty (coreutils) would need to be recompiled  
for that changed to be picked up.

Peter

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cygcheck_out.txt
URL: <http://cygwin.com/pipermail/cygwin/attachments/20050909/23e75ff5/attachment.txt>
-------------- next part --------------
--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


More information about the Cygwin mailing list