Added more terminal debugging

This commit is contained in:
Michiel Broek 2004-11-30 21:08:21 +00:00
parent 174ad91d2a
commit 05d0180a91

View File

@ -231,6 +231,60 @@ int io_mode(int fd, int n)
if (!did0) {
did0 = TRUE;
tcgetattr(fd,&oldtty);
Syslog('t', "iflag%s%s%s%s%s%s%s%s%s%s%s%s%s",
(oldtty.c_iflag & IGNBRK) ? " IGNBRK":"",
(oldtty.c_iflag & BRKINT) ? " BRKINT":"",
(oldtty.c_iflag & IGNPAR) ? " IGNPAR":"",
(oldtty.c_iflag & PARMRK) ? " PARMRK":"",
(oldtty.c_iflag & INPCK) ? " INPCK":"",
(oldtty.c_iflag & ISTRIP) ? " ISTRIP":"",
(oldtty.c_iflag & INLCR) ? " INLCR":"",
(oldtty.c_iflag & IGNCR) ? " IGNCR":"",
(oldtty.c_iflag & ICRNL) ? " ICRNL":"",
(oldtty.c_iflag & IXON) ? " IXON":"",
(oldtty.c_iflag & IXOFF) ? " IXOFF":"",
(oldtty.c_iflag & IXANY) ? " IXANY":"",
(oldtty.c_iflag & IMAXBEL)? " IMAXBEL":"");
Syslog('t', "oflag%s%s%s%s%s%s%s",
(oldtty.c_oflag & OPOST) ? " OPOST":"",
(oldtty.c_oflag & ONLCR) ? " ONLCR":"",
(oldtty.c_oflag & OCRNL) ? " OCRNL":"",
(oldtty.c_oflag & OXTABS) ? " OXTABS":"",
(oldtty.c_oflag & ONOEOT) ? " ONOEOT":"",
(oldtty.c_oflag & ONOCR) ? " ONOCR":"",
(oldtty.c_oflag & ONLRET) ? " ONLRET":"");
Syslog('t', "cflag%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
(oldtty.c_cflag & CS5) ? " CS5":"",
(oldtty.c_cflag & CS6) ? " CS6":"",
(oldtty.c_cflag & CS7) ? " CS7":"",
(oldtty.c_cflag & CS8) ? " CS8":"",
(oldtty.c_cflag & CSTOPB) ? " CSTOPB":"",
(oldtty.c_cflag & CREAD) ? " CREAD":"",
(oldtty.c_cflag & PARENB) ? " PARENB":"",
(oldtty.c_cflag & PARODD) ? " PARODD":"",
(oldtty.c_cflag & HUPCL) ? " HUPCL":"",
(oldtty.c_cflag & CLOCAL) ? " CLOCAL":"",
(oldtty.c_cflag & CCTS_OFLOW) ? " CCTS_OFLOW":"",
(oldtty.c_cflag & CRTSCTS) ? " CRTSCTS":"",
(oldtty.c_cflag & CRTS_IFLOW) ? " CRTS_IFLOW":"",
(oldtty.c_cflag & MDMBUF) ? " MDMBUF":"");
Syslog('t', "lflag%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
(oldtty.c_lflag & ECHOKE) ? " ECHOKE":"",
(oldtty.c_lflag & ECHOE) ? " ECHOE":"",
(oldtty.c_lflag & ECHO) ? " ECHO":"",
(oldtty.c_lflag & ECHONL) ? " ECHONL":"",
(oldtty.c_lflag & ECHOPRT)? " ECHOPRT":"",
(oldtty.c_lflag & ECHOCTL)? " ECHOCTL":"",
(oldtty.c_lflag & ISIG) ? " ISIG":"",
(oldtty.c_lflag & ICANON) ? " ICANON":"",
(oldtty.c_lflag & ALTWERASE)? " ALTWERASE":"",
(oldtty.c_lflag & IEXTEN) ? " IEXTEN":"",
(oldtty.c_lflag & EXTPROC)? " EXTPROC":"",
(oldtty.c_lflag & TOSTOP) ? " TOSTOP":"",
(oldtty.c_lflag & FLUSHO) ? " FLUSHO":"",
(oldtty.c_lflag & NOKERNINFO)? " NOKERNINFO":"",
(oldtty.c_lflag & PENDIN) ? " PENDIN":"",
(oldtty.c_lflag & NOFLSH) ? " NOFLSH":"");
}
tty = oldtty;