diff options
author | James Buren <braewoods+rb@braewoods.net> | 2021-07-08 17:45:57 +0000 |
---|---|---|
committer | James Buren <braewoods+rb@braewoods.net> | 2021-07-08 17:47:51 +0000 |
commit | a9f36efa62c0f095994e2a711a689b3b3e81aea2 (patch) | |
tree | eebaf4a08f4b74997bd69f87dae7d0ef6ab8acbb /firmware/export | |
parent | a0f1236e882fb20611c17b1e2275505f70ba8ed4 (diff) | |
download | rockbox-a9f36efa62c0f095994e2a711a689b3b3e81aea2.tar.gz rockbox-a9f36efa62c0f095994e2a711a689b3b3e81aea2.zip |
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
Diffstat (limited to 'firmware/export')
-rw-r--r-- | firmware/export/fat.h | 7 |
1 files changed, 2 insertions, 5 deletions
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 @@ | |||
23 | 23 | ||
24 | #include <stdbool.h> | 24 | #include <stdbool.h> |
25 | #include <sys/types.h> | 25 | #include <sys/types.h> |
26 | #if defined(__PCTOOL__) || defined(SIMULATOR) || ((CONFIG_PLATFORM & PLATFORM_HOSTED) == PLATFORM_HOSTED) | ||
27 | #include <utime.h> | ||
28 | #endif | ||
29 | #include <time.h> | 26 | #include <time.h> |
30 | #include "config.h" | 27 | #include "config.h" |
31 | #include "system.h" | 28 | #include "system.h" |
@@ -143,8 +140,8 @@ enum fat_remove_op /* what should fat_remove(), remove? */ | |||
143 | int fat_remove(struct fat_file *file, enum fat_remove_op what); | 140 | int fat_remove(struct fat_file *file, enum fat_remove_op what); |
144 | int fat_rename(struct fat_file *parent, struct fat_file *file, | 141 | int fat_rename(struct fat_file *parent, struct fat_file *file, |
145 | const unsigned char *newname); | 142 | const unsigned char *newname); |
146 | int fat_utime(struct fat_file *parent, struct fat_file *file, | 143 | int fat_modtime(struct fat_file *parent, struct fat_file *file, |
147 | const struct utimbuf *utimes); | 144 | time_t modtime); |
148 | 145 | ||
149 | /** File stream functions **/ | 146 | /** File stream functions **/ |
150 | int fat_closewrite(struct fat_filestr *filestr, uint32_t size, | 147 | int fat_closewrite(struct fat_filestr *filestr, uint32_t size, |