!65 【轻量级 PR】:update apps/shell/src/shcmd.c.

Merge pull request !65 from 冷钦街/N/A
This commit is contained in:
openharmony_ci 2021-03-25 11:19:13 +08:00 committed by Gitee
commit 61531ce9e0
1 changed files with 1 additions and 1 deletions

View File

@ -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)) {