Modified for work without options COM_BIDIR into kernel.

This commit is contained in:
Andrey A. Chernov 1993-12-10 19:26:20 +00:00
parent 127447df73
commit 9bfbbf452b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=839
2 changed files with 6 additions and 10 deletions

View file

@ -58,12 +58,10 @@ int main(int argc, char *argv[])
}
if (argc == 2) {
if (ioctl(fd, TIOCMGBIDIR, &res) < 0) {
perror("TIOCMGBIDIR");
exit(1);
if (ioctl(fd, TIOCMGBIDIR, &res) >= 0) {
if (!res) printf("-");
printf("bidir ");
}
if (!res) printf("-");
printf("bidir ");
if (ioctl(fd, TIOCMGDTRWAIT, &dtrwait) < 0) {
perror("TIOCMGDTRWAIT");
exit(1);

View file

@ -58,12 +58,10 @@ int main(int argc, char *argv[])
}
if (argc == 2) {
if (ioctl(fd, TIOCMGBIDIR, &res) < 0) {
perror("TIOCMGBIDIR");
exit(1);
if (ioctl(fd, TIOCMGBIDIR, &res) >= 0) {
if (!res) printf("-");
printf("bidir ");
}
if (!res) printf("-");
printf("bidir ");
if (ioctl(fd, TIOCMGDTRWAIT, &dtrwait) < 0) {
perror("TIOCMGDTRWAIT");
exit(1);