[LCP]read - serial port programming

michael bosu mfbosu at yahoo.com
Wed May 14 20:52:02 UTC 2003


Hi,

Please to read from the serial port, what does the
function read return. For instance if the code below
return 8 for count. Does that mean the number of bytes
is 8 or what?

Also if I want to get the actual bytes received how do
I go about it.


if ((count = read(fd, &vbuf[vlen], BUFFERSIZE - vlen))
== -1) {
	      
               perror("read");
	      	exit(1);
     
	} 

Thank you,
Michael mfbosu at yahoo.com

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com



More information about the linuxCprogramming mailing list