diff options
Diffstat (limited to 'miscutils/microcom.c')
-rw-r--r-- | miscutils/microcom.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/miscutils/microcom.c b/miscutils/microcom.c index 5e29a1a..5eb2e67 100644 --- a/miscutils/microcom.c +++ b/miscutils/microcom.c @@ -19,6 +19,7 @@ //usage: "\n -X Disable special meaning of NUL and Ctrl-X from stdin" #include "libbb.h" +#include "common_bufsiz.h" // set raw tty mode static void xget1(int fd, struct termios *t, struct termios *oldt) @@ -155,10 +156,11 @@ int microcom_main(int argc UNUSED_PARAM, char **argv) skip_write: ; } if (pfd[0].revents) { -#define iobuf bb_common_bufsiz1 +#define iobuf bb_common_bufsiz1 +#define sizeof_iobuf COMMON_BUFSIZE ssize_t len; // read from device -> write to stdout - len = safe_read(sfd, iobuf, sizeof(iobuf)); + len = safe_read(sfd, iobuf, sizeof_iobuf); if (len > 0) full_write(STDOUT_FILENO, iobuf, len); else { |