summaryrefslogtreecommitdiffstats
path: root/bin/stty/stty.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/stty/stty.c')
-rw-r--r--bin/stty/stty.c13
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);
}
OpenPOWER on IntegriCloud