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/armlibc | |
| parent | 37d4abb822c60872bf21f6a1bb0b61e8e1409cc7 (diff) | |
[libc][syscalls]将在libc初始化之前调用printf的行为下调为警告级别
Diffstat (limited to 'components/libc/compilers/armlibc')
| -rw-r--r-- | components/libc/compilers/armlibc/syscalls.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/components/libc/compilers/armlibc/syscalls.c b/components/libc/compilers/armlibc/syscalls.c index a3ba57a280..7d8ec2e8b4 100644 --- a/components/libc/compilers/armlibc/syscalls.c +++ b/components/libc/compilers/armlibc/syscalls.c @@ -152,8 +152,8 @@ int _sys_read(FILEHANDLE fh, unsigned char *buf, unsigned len, int mode) #ifdef RT_USING_POSIX if (libc_stdio_get_console() < 0) { - LOG_E("invoke standard output before initializing libc"); - return -1; + LOG_W("Do not invoke standard output before initializing libc"); + return 0; } size = read(STDIN_FILENO, buf, len); return len - size; @@ -197,8 +197,8 @@ int _sys_write(FILEHANDLE fh, const unsigned char *buf, unsigned len, int mode) #ifdef RT_USING_POSIX if (libc_stdio_get_console() < 0) { - LOG_E("invoke standard input before initializing libc"); - return -1; + LOG_W("Do not invoke standard input before initializing libc"); + return 0; } size = write(STDOUT_FILENO, buf, len); return len - size; |
