: I am trying to set the port speed on the serial port on a
: slackware box
:
: code at the moment is
:
: FILE *fp;
:
: fp = fopen("/dev/ttys0","r+");
:
: but what are the parameters for the ioctl call, cannot find
: helpful docs anywhere
Why not use termios? Then you can have that warm, fuzzy,
POSIXly-correct feeling. If you simply *must* use streams,
you can use fileno(fp) to get an fd. Use the terminal control
function tcgetattr to fill-out a termios struct, then you
can use the *convenience* function, cfsetispeed.
--