-int fs_file_seek(FILE *fp, long int off, int whence) {
- return platform_fseek(fp, off, whence);
+int fs_file_seek(fs_file_t *fp, long int off, int whence) {
+ switch(whence) {
+ case FS_FILE_SEEK_CUR: whence = SEEK_CUR; break;
+ case FS_FILE_SEEK_SET: whence = SEEK_SET; break;
+ case FS_FILE_SEEK_END: whence = SEEK_END; break;
+ }
+ return platform_fseek((FILE*)fp, off, whence);
+}
+
+long int fs_file_tell(fs_file_t *fp) {
+ return platform_ftell((FILE*)fp);