KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
fs_fat.h File Reference

VFS interface for a FAT filesystem. More...

#include <sys/cdefs.h>
#include <stdint.h>
#include <kos/blockdev.h>

Go to the source code of this file.

Macros

#define FS_FAT_MOUNT_READONLY   0x00000000
 Mount read-only.
 
#define FS_FAT_MOUNT_READWRITE   0x00000001
 Mount read-write.
 

Functions

int fs_fat_init (void)
 Initialize fs_fat.
 
int fs_fat_shutdown (void)
 Shut down fs_fat.
 
int fs_fat_mount (const char *mp, kos_blockdev_t *dev, uint32_t flags)
 Mount a FAT filesystem in the VFS.
 
int fs_fat_unmount (const char *mp)
 Unmount a FAT filesystem from the VFS.
 
int fs_fat_sync (const char *mp)
 Sync a FAT filesystem, flushing all pending writes to the block device.
 

Detailed Description

VFS interface for a FAT filesystem.

This file defines the public interface to add support for the FAT filesystem, as in common use on all kinds of systems and popularized by MS-DOS and Windows. This interface supports FAT12, FAT16, and FAT32, with both short and long names.

Note that there is a lower-level interface sitting underneath of this layer. This lower-level interface (simply called fatfs) should not generally be used by any normal applications. As of this point, it is completely non thread-safe and the fs_fat layer takes extreme care to overcome those issues with the lower-level interface. Over time, I may fix the thread- safety issues in fatfs, but that is not particularly high on my priority list at the moment. There shouldn't really be a reason to work directly with the fatfs layer anyway, as this layer should give you everything you need by interfacing with the VFS in the normal fashion.

Author
Lawrence Sebald