This is the mail archive of the cygwin-patches@cygwin.com 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] |
The attached program ratchets through the bitrates defined in termios.h and tests a given (as first argument) serial port. This test will indicate if tcsetattr() returns an error when invalid bitrates are attempted on a given serial port (along with perror() to print the error-message associated w/ errno.) In the event that an invalid bitrate is attempted on a port, two events should occur. 1) tcsetattr() should return -1, and 2) errno should be set to EINVAL. Event #1 seems to work fine w/ my latest patch, but event #2 is failing because errno is always set to 0. Unless I'm doing something wrong, it appears that errno isn't being propagated back up from the call to tcsetattr() ... can someone else take a peek at this? Thanks, -Troy
Attachment:
test_serial.c
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |