From c2548abc2fd51911aa93dc88affcd033b8adf294 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=B7=E9=92=A6=E8=A1=97?= <15390014138@163.com> Date: Fri, 5 Feb 2021 09:57:31 +0800 Subject: [PATCH] update apps/shell/src/shcmd.c. --- apps/shell/src/shcmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/shell/src/shcmd.c b/apps/shell/src/shcmd.c index 06845ac8..72b7b919 100644 --- a/apps/shell/src/shcmd.c +++ b/apps/shell/src/shcmd.c @@ -201,7 +201,7 @@ static int OsSurePrintAll(unsigned int count) char readChar = 0; printf("\nDisplay all %u possibilities?(y/n)", count); while (1) { - if (read(0, &readChar, 1) != 1) { + if (read(STDIN_FILENO, &readChar, 1) != 1) { return (int)SH_ERROR; } if ((readChar == 'n') || (readChar == 'N') || (readChar == CTRL_C)) {