aboutsummaryrefslogtreecommitdiff
path: root/lib/interestingtimes.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2016-01-10 15:59:09 -0600
committerRob Landley <rob@landley.net>2016-01-10 15:59:09 -0600
commit1b983744cde6819fe1d810e98cfac52585ceacaf (patch)
treeb9ace7b8fd5de7183717a5ea4fc92001700b16c8 /lib/interestingtimes.c
parent8784d8d968c72328db11a72d50c836fc1650fa9a (diff)
downloadtoybox-1b983744cde6819fe1d810e98cfac52585ceacaf.tar.gz
Make cursor left/right change sort type in iotop.
Diffstat (limited to 'lib/interestingtimes.c')
-rw-r--r--lib/interestingtimes.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/interestingtimes.c b/lib/interestingtimes.c
index 70fd4f9b..93e2ec52 100644
--- a/lib/interestingtimes.c
+++ b/lib/interestingtimes.c
@@ -110,6 +110,11 @@ int set_terminal(int fd, int raw, struct termios *old)
return tcsetattr(fd, TCSANOW, &termio);
}
+void xset_terminal(int fd, int raw, struct termios *old)
+{
+ if (-1 == set_terminal(fd, raw, old)) perror_exit("bad tty fd#%d", fd);
+}
+
struct scan_key_list {
char *name, *seq;
} static const scan_key_list[] = TAGGED_ARRAY(KEY,
@@ -225,6 +230,7 @@ void tty_reset(void)
fflush(0);
}
+// If you call set_terminal(), use sigatexit(tty_sigreset);
void tty_sigreset(int i)
{
tty_reset();