From: ian Date: Sun, 1 May 2005 20:27:29 +0000 (+0000) Subject: found program for making tcflow serial ioctl; not really parport but hey X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ijackson/git?a=commitdiff_plain;h=77d8370baf36dabf13774ac08a01e5880f31e090;p=trains.git found program for making tcflow serial ioctl; not really parport but hey --- diff --git a/parport/serial-tcflow.c b/parport/serial-tcflow.c new file mode 100644 index 0000000..83b2946 --- /dev/null +++ b/parport/serial-tcflow.c @@ -0,0 +1,20 @@ +#include +#include +#include +#include +#include + +int main(int argc, const char *const *argv) { + int op, r; + + switch (argv[1][0]) { + case 'N': op= TCOOFF; break; + case 'Y': op= TCOON; break; + case 'n': op= TCIOFF; break; + case 'y': op= TCION; break; + default: abort(); + } + r= tcflow(3,op); + fprintf(stderr,"r=%d e=%s\n",r,strerror(errno)); + return 0; +}