summaryrefslogtreecommitdiff
path: root/miscutils/conspy.c
diff options
context:
space:
mode:
authorDenys Vlasenko2016-04-21 18:38:51 +0200
committerDenys Vlasenko2016-04-21 18:38:51 +0200
commit9de2e5a22213842da5b116723392de88de9ed419 (patch)
treedff999a566382174e084d377dc3b4c03de1d4c62 /miscutils/conspy.c
parent47cfbf32fd66563f8c4e09ad6cced6abfbe2fad5 (diff)
downloadbusybox-9de2e5a22213842da5b116723392de88de9ed419.zip
busybox-9de2e5a22213842da5b116723392de88de9ed419.tar.gz
*: hopefully all setup_common_bufsiz() are in place
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'miscutils/conspy.c')
-rw-r--r--miscutils/conspy.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/miscutils/conspy.c b/miscutils/conspy.c
index 0d96a5f..f6468c1 100644
--- a/miscutils/conspy.c
+++ b/miscutils/conspy.c
@@ -364,8 +364,6 @@ int conspy_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int conspy_main(int argc UNUSED_PARAM, char **argv)
{
char tty_name[sizeof(DEV_TTY "NN")];
-#define keybuf bb_common_bufsiz1
-#define sizeof_keybuf COMMON_BUFSIZE
struct termios termbuf;
unsigned opts;
unsigned ttynum;
@@ -384,6 +382,9 @@ int conspy_main(int argc UNUSED_PARAM, char **argv)
applet_long_options = getopt_longopts;
#endif
+#define keybuf bb_common_bufsiz1
+ setup_common_bufsiz();
+
INIT_G();
strcpy(G.vcsa_name, DEV_VCSA);
@@ -515,7 +516,7 @@ int conspy_main(int argc UNUSED_PARAM, char **argv)
default:
// Read the keys pressed
k = keybuf + G.key_count;
- bytes_read = read(G.kbd_fd, k, sizeof_keybuf - G.key_count);
+ bytes_read = read(G.kbd_fd, k, COMMON_BUFSIZE - G.key_count);
if (bytes_read < 0)
goto abort;