summaryrefslogtreecommitdiff
path: root/package/picocom/patches/patch-term_c
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2014-01-11 12:29:23 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2014-01-11 12:29:23 +0100
commit407f9b8fde3ad9cc55f39f7a548cde6056dab494 (patch)
tree0375ea8ddab3502bf6883066f43fc7e328d5c704 /package/picocom/patches/patch-term_c
parent2ecefcf609e484d04d1546581191831e07ad71ec (diff)
parentabb858ae43374dc13a5fcef19b9e0ba9442013bb (diff)
Merge branch 'master' of git+ssh://openadk.org/git/openadk
Diffstat (limited to 'package/picocom/patches/patch-term_c')
-rw-r--r--package/picocom/patches/patch-term_c106
1 files changed, 106 insertions, 0 deletions
diff --git a/package/picocom/patches/patch-term_c b/package/picocom/patches/patch-term_c
new file mode 100644
index 000000000..6ed95ab65
--- /dev/null
+++ b/package/picocom/patches/patch-term_c
@@ -0,0 +1,106 @@
+--- picocom-1.7.orig/term.c 2010-05-29 00:41:19.000000000 +0200
++++ picocom-1.7/term.c 2013-12-26 09:45:20.000000000 +0100
+@@ -33,11 +33,7 @@
+ #include <string.h>
+ #include <errno.h>
+ #include <unistd.h>
+-#ifdef __linux__
+-#include <termio.h>
+-#else
+ #include <termios.h>
+-#endif /* of __linux__ */
+
+ #include "term.h"
+
+@@ -945,27 +941,6 @@ term_pulse_dtr (int fd)
+ break;
+ }
+
+-#ifdef __linux__
+- {
+- int opins = TIOCM_DTR;
+-
+- r = ioctl(fd, TIOCMBIC, &opins);
+- if ( r < 0 ) {
+- term_errno = TERM_EDTRDOWN;
+- rval = -1;
+- break;
+- }
+-
+- sleep(1);
+-
+- r = ioctl(fd, TIOCMBIS, &opins);
+- if ( r < 0 ) {
+- term_errno = TERM_EDTRUP;
+- rval = -1;
+- break;
+- }
+- }
+-#else
+ {
+ struct termios tio, tioold;
+
+@@ -997,8 +972,6 @@ term_pulse_dtr (int fd)
+ break;
+ }
+ }
+-#endif /* of __linux__ */
+-
+ } while (0);
+
+ return rval;
+@@ -1020,19 +993,6 @@ term_raise_dtr(int fd)
+ rval = -1;
+ break;
+ }
+-
+-#ifdef __linux__
+- {
+- int opins = TIOCM_DTR;
+-
+- r = ioctl(fd, TIOCMBIS, &opins);
+- if ( r < 0 ) {
+- term_errno = TERM_EDTRUP;
+- rval = -1;
+- break;
+- }
+- }
+-#else
+ r = tcsetattr(fd, TCSANOW, &term.currtermios[i]);
+ if ( r < 0 ) {
+ /* FIXME: perhaps try to update currtermios */
+@@ -1040,7 +1000,6 @@ term_raise_dtr(int fd)
+ rval = -1;
+ break;
+ }
+-#endif /* of __linux__ */
+ } while (0);
+
+ return rval;
+@@ -1064,18 +1023,6 @@ term_lower_dtr(int fd)
+ break;
+ }
+
+-#ifdef __linux__
+- {
+- int opins = TIOCM_DTR;
+-
+- r = ioctl(fd, TIOCMBIC, &opins);
+- if ( r < 0 ) {
+- term_errno = TERM_EDTRDOWN;
+- rval = -1;
+- break;
+- }
+- }
+-#else
+ {
+ struct termios tio;
+
+@@ -1097,7 +1044,6 @@ term_lower_dtr(int fd)
+ break;
+ }
+ }
+-#endif /* of __linux__ */
+ } while (0);
+
+ return rval;