diff options
author | Rong-En Fan <rafan@FreeBSD.org> | 2006-08-13 10:10:50 +0000 |
---|---|---|
committer | Rong-En Fan <rafan@FreeBSD.org> | 2006-08-13 10:10:50 +0000 |
commit | 0c1485c98fd98275bb64c08567a4f5ff1257332f (patch) | |
tree | 1dea6fcae2a939abe7eddb65374910b0e193ad85 /comms/libirman/files | |
parent | 3bf8c7bb8a8195ff0b5c90faf3bf9ca13267fb84 (diff) | |
download | ports-0c1485c98fd98275bb64c08567a4f5ff1257332f.tar.gz ports-0c1485c98fd98275bb64c08567a4f5ff1257332f.zip |
Notes
Diffstat (limited to 'comms/libirman/files')
-rw-r--r-- | comms/libirman/files/patch-irio.c | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/comms/libirman/files/patch-irio.c b/comms/libirman/files/patch-irio.c new file mode 100644 index 000000000000..a1f47f3ecb1a --- /dev/null +++ b/comms/libirman/files/patch-irio.c @@ -0,0 +1,43 @@ +--- irio.c.orig Mon Mar 29 00:42:41 1999 ++++ irio.c Thu Aug 10 22:44:50 2006 +@@ -66,17 +66,11 @@ + * + */ + +-/* +- * Ignore the things in SUNATTEMPT. They're not even needed for a Sun. +- */ +- +- + int ir_open_port(char *filename) + { + int parnum = 0; +-#ifdef SUNATTEMPT ++ int clearhand = 0; + int hand = TIOCM_DTR | TIOCM_RTS; +-#endif + int baudrate=B9600; + + /* get a file descriptor */ +@@ -188,13 +182,19 @@ + return -1; + } + +-#ifdef SUNATTEMPT ++ /* drop the control lines to cut power to the unit */ ++ if (ioctl(portfd, TIOCMSET, &clearhand) < 0) { ++ printf("ioctl error\n"); ++ return -1; ++ } ++ ++ sleep(2); ++ + /* raise the control lines to power the unit*/ + if (ioctl(portfd, TIOCMSET, &hand) < 0) { + printf("ioctl error\n"); + return -1; + } +-#endif + + /* wait a little while for everything to settle through */ + ir_usleep(IR_POWER_ON_LATENCY); |