This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Please try a snapshot - stty issue


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

Attachment: cygcheck_out.txt
Description: Text document

--
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/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]