[components][dfs][fatfs] Add return 0 to get_fattime when RT_USING_LIBC not enable.
This commit is contained in:
parent
22d5e3c3a9
commit
0406175003
|
@ -924,10 +924,12 @@ DRESULT disk_ioctl(BYTE drv, BYTE ctrl, void *buff)
|
|||
|
||||
DWORD get_fattime(void)
|
||||
{
|
||||
DWORD fat_time = 0;
|
||||
|
||||
#ifdef RT_USING_LIBC
|
||||
time_t now;
|
||||
struct tm *p_tm;
|
||||
struct tm tm_now;
|
||||
DWORD fat_time;
|
||||
|
||||
/* get current time */
|
||||
now = time(RT_NULL);
|
||||
|
@ -947,6 +949,7 @@ DWORD get_fattime(void)
|
|||
(DWORD)tm_now.tm_hour << 11 |
|
||||
(DWORD)tm_now.tm_min << 5 |
|
||||
(DWORD)tm_now.tm_sec / 2 ;
|
||||
#endif /* RT_USING_LIBC */
|
||||
|
||||
return fat_time;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue