mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 13:12:37 -05:00
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
This commit is contained in:
parent
a0f1236e88
commit
a9f36efa62
6 changed files with 16 additions and 28 deletions
|
|
@ -85,8 +85,8 @@ int fdprintf(int fildes, const char *fmt, ...) ATTRIBUTE_PRINTF(2, 3);
|
|||
#ifndef rename
|
||||
#define rename FS_PREFIX(rename)
|
||||
#endif
|
||||
#ifndef utime
|
||||
#define utime FS_PREFIX(utime)
|
||||
#ifndef modtime
|
||||
#define modtime FS_PREFIX(modtime)
|
||||
#endif
|
||||
#ifndef filesize
|
||||
#define filesize FS_PREFIX(filesize)
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ ssize_t read(int fildes, void *buf, size_t nbyte);
|
|||
ssize_t write(int fildes, const void *buf, size_t nbyte);
|
||||
int remove(const char *path);
|
||||
int rename(const char *old, const char *new);
|
||||
int utime(const char *path, const struct utimbuf* times);
|
||||
int modtime(const char *path, time_t modtime);
|
||||
off_t filesize(int fildes);
|
||||
int fsamefile(int fildes1, int fildes2);
|
||||
int relate(const char *path1, const char *path2);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue