浏览代码

[libc][time][bug] LOG_W will cause a recursive printing if ulog timestamp function is turned on

Meco Man 4 年之前
父节点
当前提交
b4040df9dc
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      components/libc/compilers/common/time.c

+ 2 - 1
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;
     }