提交 c2548abc 编写于 作者: 冷钦街 提交者: Gitee

update apps/shell/src/shcmd.c.

上级 71144b4a
...@@ -201,7 +201,7 @@ static int OsSurePrintAll(unsigned int count) ...@@ -201,7 +201,7 @@ static int OsSurePrintAll(unsigned int count)
char readChar = 0; char readChar = 0;
printf("\nDisplay all %u possibilities?(y/n)", count); printf("\nDisplay all %u possibilities?(y/n)", count);
while (1) { while (1) {
if (read(0, &readChar, 1) != 1) { if (read(STDIN_FILENO, &readChar, 1) != 1) {
return (int)SH_ERROR; return (int)SH_ERROR;
} }
if ((readChar == 'n') || (readChar == 'N') || (readChar == CTRL_C)) { if ((readChar == 'n') || (readChar == 'N') || (readChar == CTRL_C)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册