mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
spiffs: Fix for case when CONFIG_SPIFFS_USE_MTIME is not defined
Closes: 2c793cef06
This commit is contained in:
parent
340ffcb1a9
commit
e85e99189f
@ -76,7 +76,9 @@ static int vfs_spiffs_mkdir(void* ctx, const char* name, mode_t mode);
|
|||||||
static int vfs_spiffs_rmdir(void* ctx, const char* name);
|
static int vfs_spiffs_rmdir(void* ctx, const char* name);
|
||||||
static void vfs_spiffs_update_mtime(spiffs *fs, spiffs_file f);
|
static void vfs_spiffs_update_mtime(spiffs *fs, spiffs_file f);
|
||||||
static time_t vfs_spiffs_get_mtime(const spiffs_stat* s);
|
static time_t vfs_spiffs_get_mtime(const spiffs_stat* s);
|
||||||
|
#ifdef CONFIG_SPIFFS_USE_MTIME
|
||||||
static int vfs_spiffs_utime(void *ctx, const char *path, const struct utimbuf *times);
|
static int vfs_spiffs_utime(void *ctx, const char *path, const struct utimbuf *times);
|
||||||
|
#endif
|
||||||
|
|
||||||
static esp_spiffs_t * _efs[CONFIG_SPIFFS_MAX_PARTITIONS];
|
static esp_spiffs_t * _efs[CONFIG_SPIFFS_MAX_PARTITIONS];
|
||||||
|
|
||||||
@ -749,9 +751,11 @@ static void vfs_spiffs_update_mtime(spiffs *fs, spiffs_file fd)
|
|||||||
|
|
||||||
static time_t vfs_spiffs_get_mtime(const spiffs_stat* s)
|
static time_t vfs_spiffs_get_mtime(const spiffs_stat* s)
|
||||||
{
|
{
|
||||||
spiffs_time_t t = 0;
|
|
||||||
#ifdef CONFIG_SPIFFS_USE_MTIME
|
#ifdef CONFIG_SPIFFS_USE_MTIME
|
||||||
|
spiffs_time_t t = 0;
|
||||||
memcpy(&t, s->meta, sizeof(t));
|
memcpy(&t, s->meta, sizeof(t));
|
||||||
|
#else
|
||||||
|
time_t t = 0;
|
||||||
#endif
|
#endif
|
||||||
return (time_t)t;
|
return (time_t)t;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user