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
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);