From a9f36efa62c0f095994e2a711a689b3b3e81aea2 Mon Sep 17 00:00:00 2001 From: James Buren Date: Thu, 8 Jul 2021 17:45:57 +0000 Subject: file/fat: rework utime function as modtime extension This eliminates the dependence on a special struct since we were only using the modtime anyway. But it no longer fits any known standard APIs so I have converted it to our own extension instead. This can still be adapted to existing hosted APIs if the need arises. Change-Id: Ic8800698ddfd3a1a48b7cf921c0d0f865302d034 --- firmware/export/fat.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'firmware/export') diff --git a/firmware/export/fat.h b/firmware/export/fat.h index f2aae4f5f0..70152985b5 100644 --- a/firmware/export/fat.h +++ b/firmware/export/fat.h @@ -23,9 +23,6 @@ #include #include -#if defined(__PCTOOL__) || defined(SIMULATOR) || ((CONFIG_PLATFORM & PLATFORM_HOSTED) == PLATFORM_HOSTED) -#include -#endif #include #include "config.h" #include "system.h" @@ -143,8 +140,8 @@ enum fat_remove_op /* what should fat_remove(), remove? */ int fat_remove(struct fat_file *file, enum fat_remove_op what); int fat_rename(struct fat_file *parent, struct fat_file *file, const unsigned char *newname); -int fat_utime(struct fat_file *parent, struct fat_file *file, - const struct utimbuf *utimes); +int fat_modtime(struct fat_file *parent, struct fat_file *file, + time_t modtime); /** File stream functions **/ int fat_closewrite(struct fat_filestr *filestr, uint32_t size, -- cgit v1.2.3