From d21b05c0f69877130366ad37b852a0f30c11809d Mon Sep 17 00:00:00 2001 From: zff Date: Fri, 8 Oct 2021 10:01:31 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=80=9A=E8=BF=87g=5Fuart=5Ffputc=5Fen?= =?UTF-8?q?=E5=85=B3=E9=97=AD=E6=89=93=E5=8D=B0=E5=90=8E=EF=BC=8Cshell?= =?UTF-8?q?=E8=BF=9B=E7=A8=8B=E4=B8=8D=E8=83=BD=E6=AD=A3=E5=B8=B8=E5=90=AF?= =?UTF-8?q?=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit console层的实现中复用g_uart_fputc_en用于关闭打印的功能,代码设计上认为 g_uart_fputc_en为0时console层未使能,导致shell进程中ioctl操作失败,shell 进程不能正常启动。 close: #I4CTY2 Signed-off-by: zff Change-Id: I0a225c1db42f2b384ad590ca05b048c4b61db99c --- kernel/common/console.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/kernel/common/console.c b/kernel/common/console.c index f0bd601a..992af94d 100644 --- a/kernel/common/console.c +++ b/kernel/common/console.c @@ -1420,8 +1420,6 @@ BOOL ConsoleEnable(VOID) if (g_uart_fputc_en == 0) { if ((g_console[CONSOLE_TELNET - 1] != NULL) && OsPreemptable()) { return TRUE; - } else { - return FALSE; } } @@ -1538,8 +1536,6 @@ INT32 ConsoleUpdateFd(VOID) if (g_uart_fputc_en == 0) { if (g_console[CONSOLE_TELNET - 1] != NULL) { consoleID = CONSOLE_TELNET; - } else { - return -1; } } else if (consoleID == 0) { if (g_console[CONSOLE_SERIAL - 1] != NULL) { -- GitLab