From de701429a77d867ce7be49a3b25224d5269a4a6f Mon Sep 17 00:00:00 2001 From: "S.J.R. van Schaik" Date: Mon, 24 Jul 2017 17:06:54 +0200 Subject: [PATCH] shell: mufs: use a temporary hack to get unbuffered input from the serial interface --- source/shell/mufs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/shell/mufs.c b/source/shell/mufs.c index fa33e04..b405afd 100644 --- a/source/shell/mufs.c +++ b/source/shell/mufs.c @@ -17,6 +17,8 @@ extern struct flash_dev *flash; struct mufs *mufs = NULL; +extern struct usart_console *admin_con; + static void do_mufs_mount(FILE *out, const char **argv, size_t argc) { (void)argc; @@ -190,7 +192,7 @@ static void do_mufs_write(FILE *out, const char **argv, size_t argc) fprintf(out, "> "); - while ((ret = fread(data, sizeof *data, sizeof data, out)) > 0) { + while ((ret = console_read(admin_con, data, sizeof data)) > 0) { mufs_write(file, data, ret); fprintf(out, "> "); }