summaryrefslogtreecommitdiff
path: root/components/libc/compilers/dlib/syscall_write.c
diff options
context:
space:
mode:
authorMeco Man <[email protected]>2021-09-27 07:29:50 -0400
committerMeco Man <[email protected]>2021-09-27 07:49:25 -0400
commit0a799653df4ae4bcaeef78620768a1c8d6242d94 (patch)
treec0820262509270d6d880db7c9c87ab458670b433 /components/libc/compilers/dlib/syscall_write.c
parent37d4abb822c60872bf21f6a1bb0b61e8e1409cc7 (diff)
[libc][syscalls]将在libc初始化之前调用printf的行为下调为警告级别
Diffstat (limited to 'components/libc/compilers/dlib/syscall_write.c')
-rw-r--r--components/libc/compilers/dlib/syscall_write.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/libc/compilers/dlib/syscall_write.c b/components/libc/compilers/dlib/syscall_write.c
index bd7cc83d99..ffee51882d 100644
--- a/components/libc/compilers/dlib/syscall_write.c
+++ b/components/libc/compilers/dlib/syscall_write.c
@@ -36,8 +36,8 @@ size_t __write(int handle, const unsigned char *buf, size_t len)
#ifdef RT_USING_POSIX
if (libc_stdio_get_console() < 0)
{
- LOG_E("invoke standard output before initializing libc");
- return _LLIO_ERROR;
+ LOG_W("Do not invoke standard output before initializing libc");
+ return 0;
}
return write(STDOUT_FILENO, (void*)buf, len);
#else