On Jan 2, 2007, at 12:39 PM, Mayur Shah wrote:
I have a C program that tries to write to the serial port on the gumstix device. I get a return value of -1 when I try to write to the serial port using this command,
write(sportfd, &char_reg, sizeof(char_reg)
Not sure why I am not able to write even a single byte of data.
Upon successful completion the number of bytes which were written is
returned. Otherwise a -1 is returned and the global variable errno is
set to indicate the error.
So.... what is errno set to after write() returns -1?