shell: mufs: use a temporary hack to get unbuffered input from the serial interface
This commit is contained in:
parent
846ea90bdc
commit
de701429a7
1 changed files with 3 additions and 1 deletions
|
@ -17,6 +17,8 @@
|
||||||
extern struct flash_dev *flash;
|
extern struct flash_dev *flash;
|
||||||
struct mufs *mufs = NULL;
|
struct mufs *mufs = NULL;
|
||||||
|
|
||||||
|
extern struct usart_console *admin_con;
|
||||||
|
|
||||||
static void do_mufs_mount(FILE *out, const char **argv, size_t argc)
|
static void do_mufs_mount(FILE *out, const char **argv, size_t argc)
|
||||||
{
|
{
|
||||||
(void)argc;
|
(void)argc;
|
||||||
|
@ -190,7 +192,7 @@ static void do_mufs_write(FILE *out, const char **argv, size_t argc)
|
||||||
|
|
||||||
fprintf(out, "> ");
|
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);
|
mufs_write(file, data, ret);
|
||||||
fprintf(out, "> ");
|
fprintf(out, "> ");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue