Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

filesystem: implement os_modtime for unix

Change-Id: If030d526f29aa786b5a37402413d804752286cf5

+14
+1
firmware/target/hosted/filesystem-app.h
··· 82 82 #endif /* HAVE_SDL_THREADS */ 83 83 int app_remove(const char *path); 84 84 int app_rename(const char *old, const char *new); 85 + #define app_modtime os_modtime 85 86 #define app_filesize os_filesize 86 87 #define app_fsamefile os_fsamefile 87 88 int app_relate(const char *path1, const char *path2);
+1
firmware/target/hosted/filesystem-hosted.h
··· 33 33 #define _FILESYSTEM_HOSTED__FILE_H_ 34 34 35 35 #ifndef OSFUNCTIONS_DECLARED 36 + int os_modtime(const char *path, time_t modtime); 36 37 off_t os_filesize(int osfd); 37 38 int os_fsamefile(int osfd1, int osfd2); 38 39 int os_relate(const char *path1, const char *path2);
+12
firmware/target/hosted/filesystem-unix.c
··· 23 23 #include <sys/stat.h> 24 24 #include <string.h> 25 25 #include <errno.h> 26 + #include <utime.h> 26 27 #include "config.h" 27 28 #include "system.h" 28 29 #include "file.h" ··· 34 35 35 36 #define SAME_FILE_INFO(sb1p, sb2p) \ 36 37 ((sb1p)->st_dev == (sb2p)->st_dev && (sb1p)->st_ino == (sb2p)->st_ino) 38 + 39 + int os_modtime(const char *path, time_t modtime) 40 + { 41 + struct utimbuf times = 42 + { 43 + .actime = modtime, 44 + .modtime = modtime, 45 + }; 46 + 47 + return utime(path, &times); 48 + } 37 49 38 50 off_t os_filesize(int osfd) 39 51 {