diff options
Diffstat (limited to 'console-tools/resize.c')
-rw-r--r-- | console-tools/resize.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/console-tools/resize.c b/console-tools/resize.c index 97866673a..8aa487c41 100644 --- a/console-tools/resize.c +++ b/console-tools/resize.c | |||
@@ -24,6 +24,7 @@ | |||
24 | //config: COLUMNS=80;LINES=44;export COLUMNS LINES; | 24 | //config: COLUMNS=80;LINES=44;export COLUMNS LINES; |
25 | 25 | ||
26 | //applet:IF_RESIZE(APPLET_NOEXEC(resize, resize, BB_DIR_USR_BIN, BB_SUID_DROP, resize)) | 26 | //applet:IF_RESIZE(APPLET_NOEXEC(resize, resize, BB_DIR_USR_BIN, BB_SUID_DROP, resize)) |
27 | /* bb_common_bufsiz1 usage here is safe wrt NOEXEC: not expecting it to be zeroed. */ | ||
27 | 28 | ||
28 | //kbuild:lib-$(CONFIG_RESIZE) += resize.o | 29 | //kbuild:lib-$(CONFIG_RESIZE) += resize.o |
29 | 30 | ||
@@ -63,6 +64,7 @@ int resize_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) | |||
63 | */ | 64 | */ |
64 | 65 | ||
65 | tcgetattr(STDERR_FILENO, old_termios_p); /* fiddle echo */ | 66 | tcgetattr(STDERR_FILENO, old_termios_p); /* fiddle echo */ |
67 | //TODO: die if the above fails? | ||
66 | memcpy(&new, old_termios_p, sizeof(new)); | 68 | memcpy(&new, old_termios_p, sizeof(new)); |
67 | new.c_cflag |= (CLOCAL | CREAD); | 69 | new.c_cflag |= (CLOCAL | CREAD); |
68 | new.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG); | 70 | new.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG); |