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/drivers | |
parent | a0f1236e882fb20611c17b1e2275505f70ba8ed4 (diff) |
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/drivers')
-rw-r--r-- | firmware/drivers/fat.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/firmware/drivers/fat.c b/firmware/drivers/fat.c index 28d4eb1987..0c02c8224f 100644 --- a/firmware/drivers/fat.c +++ b/firmware/drivers/fat.c @@ -2276,8 +2276,8 @@ fat_error: return rc; } -int fat_utime(struct fat_file *parent, struct fat_file *file, - const struct utimbuf *times) +int fat_modtime(struct fat_file *parent, struct fat_file *file, + time_t modtime) { struct bpb * const fat_bpb = FAT_BPB(parent->volume); @@ -2297,7 +2297,7 @@ int fat_utime(struct fat_file *parent, struct fat_file *file, uint16_t date; uint16_t time; - dostime_localtime(times->modtime, &date, &time); + dostime_localtime(modtime, &date, &time); ent->wrttime = htole16(time); ent->wrtdate = htole16(date); |