diff options
author | Andrey A. Chernov <ache@FreeBSD.org> | 1993-12-10 19:26:20 +0000 |
---|---|---|
committer | Andrey A. Chernov <ache@FreeBSD.org> | 1993-12-10 19:26:20 +0000 |
commit | 9bfbbf452b8d834140e8c2d41b098d558dc3335f (patch) | |
tree | a75733c552fcf678687b0e9652f45f37239fbc7c | |
parent | 127447df73db0950b5869c1c9cfd46c9a5f705f8 (diff) | |
download | src-9bfbbf452b8d834140e8c2d41b098d558dc3335f.tar.gz src-9bfbbf452b8d834140e8c2d41b098d558dc3335f.zip |
Modified for work without options COM_BIDIR into kernel.
Notes
Notes:
svn path=/head/; revision=839
-rw-r--r-- | sbin/comcontrol/comcontrol.c | 8 | ||||
-rw-r--r-- | sbin/i386/comcontrol/comcontrol.c | 8 |
2 files changed, 6 insertions, 10 deletions
diff --git a/sbin/comcontrol/comcontrol.c b/sbin/comcontrol/comcontrol.c index 194554a63c52..e88e3d8f71e0 100644 --- a/sbin/comcontrol/comcontrol.c +++ b/sbin/comcontrol/comcontrol.c @@ -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); diff --git a/sbin/i386/comcontrol/comcontrol.c b/sbin/i386/comcontrol/comcontrol.c index 194554a63c52..e88e3d8f71e0 100644 --- a/sbin/i386/comcontrol/comcontrol.c +++ b/sbin/i386/comcontrol/comcontrol.c @@ -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); |