diff options
author | ache <ache@FreeBSD.org> | 2000-04-30 17:04:26 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 2000-04-30 17:04:26 +0000 |
commit | 9e83ee311bb66d63ab25c123779e61ad1f1cd5cf (patch) | |
tree | 305e8fe881e5c9e0897ab997e1a47432486ce0d1 /bin/stty/stty.c | |
parent | aa662159af43f8cb75ca80df5e1d2d4653eafa64 (diff) | |
download | FreeBSD-src-9e83ee311bb66d63ab25c123779e61ad1f1cd5cf.zip FreeBSD-src-9e83ee311bb66d63ab25c123779e61ad1f1cd5cf.tar.gz |
Back out all drainwait changes. It is enough controllable via sysctl or
comcontrol, having it in stty cause too many problems with existing drivers
and tty access permissings of non-superuser.
Asked-by: bde
Diffstat (limited to 'bin/stty/stty.c')
-rw-r--r-- | bin/stty/stty.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/bin/stty/stty.c b/bin/stty/stty.c index 355d1cd..3b59131 100644 --- a/bin/stty/stty.c +++ b/bin/stty/stty.c @@ -103,8 +103,6 @@ args: argc -= optind; err(1, "TIOCGETD"); if (ioctl(i.fd, TIOCGWINSZ, &i.win) < 0) warn("TIOCGWINSZ: %s\n", strerror(errno)); - if (ioctl(i.fd, TIOCGDRAINWAIT, &i.timeout) < 0) - warn("TIOCGDRAINWAIT: %s\n", strerror(errno)); checkredirect(); /* conversion aid */ @@ -115,14 +113,14 @@ args: argc -= optind; /* FALLTHROUGH */ case BSD: case POSIX: - print(&i.t, &i.win, i.ldisc, i.timeout, fmt); + print(&i.t, &i.win, i.ldisc, fmt); break; case GFLAG: - gprint(&i.t, &i.win, i.ldisc, i.timeout); + gprint(&i.t, &i.win, i.ldisc); break; } - for (i.set = i.wset = i.tset = 0; *argv; ++argv) { + for (i.set = i.wset = 0; *argv; ++argv) { if (ksearch(&argv, &i)) continue; @@ -143,7 +141,8 @@ args: argc -= optind; } if (!strncmp(*argv, "gfmt1", sizeof("gfmt1") - 1)) { - gread(&i, *argv + sizeof("gfmt1") - 1); + gread(&i.t, *argv + sizeof("gfmt1") - 1); + i.set = 1; continue; } @@ -155,8 +154,6 @@ args: argc -= optind; err(1, "tcsetattr"); if (i.wset && ioctl(i.fd, TIOCSWINSZ, &i.win) < 0) warn("TIOCSWINSZ"); - if (i.tset && ioctl(i.fd, TIOCSDRAINWAIT, &i.timeout) < 0) - warn("TIOCSDRAINWAIT"); exit(0); } |