From d854ea59900f3b0bf15e32dd27a4e635fcb7d204 Mon Sep 17 00:00:00 2001 From: ache Date: Fri, 10 Dec 1993 19:26:20 +0000 Subject: Modified for work without options COM_BIDIR into kernel. --- sbin/comcontrol/comcontrol.c | 8 +++----- sbin/i386/comcontrol/comcontrol.c | 8 +++----- 2 files changed, 6 insertions(+), 10 deletions(-) (limited to 'sbin') 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); -- cgit v1.1