aboutsummaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>1993-12-10 19:26:20 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>1993-12-10 19:26:20 +0000
commit9bfbbf452b8d834140e8c2d41b098d558dc3335f (patch)
treea75733c552fcf678687b0e9652f45f37239fbc7c /sbin
parent127447df73db0950b5869c1c9cfd46c9a5f705f8 (diff)
downloadsrc-9bfbbf452b8d834140e8c2d41b098d558dc3335f.tar.gz
src-9bfbbf452b8d834140e8c2d41b098d558dc3335f.zip
Modified for work without options COM_BIDIR into kernel.
Notes
Notes: svn path=/head/; revision=839
Diffstat (limited to 'sbin')
-rw-r--r--sbin/comcontrol/comcontrol.c8
-rw-r--r--sbin/i386/comcontrol/comcontrol.c8
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);