summaryrefslogtreecommitdiffstats
path: root/sbin/i386/comcontrol/comcontrol.c
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/i386/comcontrol/comcontrol.c')
-rw-r--r--sbin/i386/comcontrol/comcontrol.c8
1 files changed, 3 insertions, 5 deletions
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