diff options
| author | Meco Man <[email protected]> | 2021-09-27 07:29:50 -0400 |
|---|---|---|
| committer | Meco Man <[email protected]> | 2021-09-27 07:49:25 -0400 |
| commit | 0a799653df4ae4bcaeef78620768a1c8d6242d94 (patch) | |
| tree | c0820262509270d6d880db7c9c87ab458670b433 /components/libc/compilers/dlib/syscall_read.c | |
| parent | 37d4abb822c60872bf21f6a1bb0b61e8e1409cc7 (diff) | |
[libc][syscalls]将在libc初始化之前调用printf的行为下调为警告级别
Diffstat (limited to 'components/libc/compilers/dlib/syscall_read.c')
| -rw-r--r-- | components/libc/compilers/dlib/syscall_read.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/components/libc/compilers/dlib/syscall_read.c b/components/libc/compilers/dlib/syscall_read.c index bdc694b7d8..ae980be6ca 100644 --- a/components/libc/compilers/dlib/syscall_read.c +++ b/components/libc/compilers/dlib/syscall_read.c @@ -31,8 +31,8 @@ size_t __read(int handle, unsigned char *buf, size_t len) #ifdef RT_USING_POSIX if (libc_stdio_get_console() < 0) { - LOG_E("invoke standard input before initializing libc"); - return _LLIO_ERROR; + LOG_W("Do not invoke standard input before initializing libc"); + return 0; } return read(STDIN_FILENO, buf, len); #else |
