On Jan 2, 2007, at 12:39 PM, Mayur Shah wrote:

    bzero(&sportios, sizeof(sportios));     /* clear struct for new port settings */ 

That's wrong, I think.  You want to call tcgetattr() or cfmakeraw() not bzero() to initialize that structure.

  ioctl(sportfd, TIOCMGET, &status);

I'm not 100% sure, but I think the TIOCMGET ioctl was deprecated if not entirely removed in the 2.6 kernel, and I don't think the replacing tiocmget/tiocmset is accessible from userspace.

For sample code which does some basic serial port I/O, you can look at:

http://svn.gumstix.com/gumstix-buildroot/trunk/package/rok-flash/src

C