mirror of
https://repo.or.cz/socat.git
synced 2025-07-12 14:43:24 +00:00
Substituted ISPEED_OFFSET mechanism for cfsetispeed() calls
This commit is contained in:
parent
1301cacad3
commit
ea42d022c6
9 changed files with 112 additions and 84 deletions
17
sycls.c
17
sycls.c
|
@ -1472,10 +1472,18 @@ int Tcgetattr(int fd, struct termios *termios_p) {
|
|||
cp += sprintf(cp, "%02x,", termios_p->c_cc[i]);
|
||||
}
|
||||
sprintf(cp, "%02x", termios_p->c_cc[i]);
|
||||
#if HAVE_STRUCT_TERMIOS_C_ISPEED && HAVE_STRUCT_TERMIOS_C_OSPEED
|
||||
Debug8("tcgetattr(, {%08x,%08x,%08x,%08x, "F_speed","F_speed", %s}) -> %d",
|
||||
termios_p->c_iflag, termios_p->c_oflag,
|
||||
termios_p->c_cflag, termios_p->c_lflag,
|
||||
termios_p->c_ispeed, termios_p->c_ospeed,
|
||||
chars, result);
|
||||
#else
|
||||
Debug6("tcgetattr(, {%08x,%08x,%08x,%08x,%s}) -> %d",
|
||||
termios_p->c_iflag, termios_p->c_oflag,
|
||||
termios_p->c_cflag, termios_p->c_lflag,
|
||||
chars, result);
|
||||
#endif
|
||||
errno = _errno;
|
||||
return result;
|
||||
}
|
||||
|
@ -1490,9 +1498,18 @@ int Tcsetattr(int fd, int optional_actions, struct termios *termios_p) {
|
|||
cp += sprintf(cp, "%02x,", termios_p->c_cc[i]);
|
||||
}
|
||||
sprintf(cp, "%02x", termios_p->c_cc[i]);
|
||||
#if HAVE_STRUCT_TERMIOS_C_ISPEED && HAVE_STRUCT_TERMIOS_C_OSPEED
|
||||
Debug9("tcsetattr(%d, %d, {%08x,%08x,%08x,%08x, "F_speed","F_speed", %s})",
|
||||
fd, optional_actions,
|
||||
termios_p->c_iflag, termios_p->c_oflag,
|
||||
termios_p->c_cflag, termios_p->c_lflag,
|
||||
termios_p->c_ispeed, termios_p->c_ospeed,
|
||||
chars);
|
||||
#else
|
||||
Debug7("tcsetattr(%d, %d, {%08x,%08x,%08x,%08x,%s})", fd, optional_actions,
|
||||
termios_p->c_iflag, termios_p->c_oflag,
|
||||
termios_p->c_cflag, termios_p->c_lflag, chars);
|
||||
#endif
|
||||
result = tcsetattr(fd, optional_actions, termios_p);
|
||||
_errno = errno;
|
||||
Debug1("tcsetattr() -> %d", result);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue