summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorMeco Man <[email protected]>2021-04-11 13:31:11 +0800
committerMeco Man <[email protected]>2021-04-11 13:31:11 +0800
commitb4040df9dca12574c7cc8fd37a655e811d1337da (patch)
tree693ed0803560b39b035f1db27ba2c5485a5d0c34 /components
parentb2f23f2a96a960db5464ee2a03cddda909b2c3a4 (diff)
[libc][time][bug] LOG_W will cause a recursive printing if ulog timestamp function is turned on
Diffstat (limited to 'components')
-rw-r--r--components/libc/compilers/common/time.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/components/libc/compilers/common/time.c b/components/libc/compilers/common/time.c
index 83b6ed5672..72aa8a42f4 100644
--- a/components/libc/compilers/common/time.c
+++ b/components/libc/compilers/common/time.c
@@ -224,7 +224,8 @@ RT_WEAK time_t time(time_t *t)
if(time_now == (time_t)-1)
{
- LOG_W("Cannot find a RTC device to provide time!");
+ /* LOG_W will cause a recursive printing if ulog timestamp function is turned on */
+ rt_kprintf("Cannot find a RTC device to provide time!\r\n");
errno = ENOSYS;
}