diff options
Diffstat (limited to 'sbin/comcontrol')
-rw-r--r-- | sbin/comcontrol/comcontrol.c | 8 |
1 files changed, 3 insertions, 5 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); |