summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1993-12-10 19:26:20 +0000
committerache <ache@FreeBSD.org>1993-12-10 19:26:20 +0000
commitd854ea59900f3b0bf15e32dd27a4e635fcb7d204 (patch)
treea75733c552fcf678687b0e9652f45f37239fbc7c /sbin
parent4bb66b3efe8d2e74432e8cf8cb43dc4209cd4b78 (diff)
downloadFreeBSD-src-d854ea59900f3b0bf15e32dd27a4e635fcb7d204.zip
FreeBSD-src-d854ea59900f3b0bf15e32dd27a4e635fcb7d204.tar.gz
Modified for work without options COM_BIDIR into kernel.
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 194554a..e88e3d8 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 194554a..e88e3d8 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);
OpenPOWER on IntegriCloud