|
KallistiOS git master
Independent SDK for the Sega Dreamcast
|
FAT 12, 16, and 32-bit support for KOS's VFS More...
Topics | |
| Mount Flags | |
| Mount flags for fs_fat | |
Files | |
| file | fs_fat.h |
| VFS interface for a FAT filesystem. | |
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. | |
FAT 12, 16, and 32-bit support for KOS's VFS
| int fs_fat_init | ( | void | ) |
Initialize fs_fat.
This function initializes fs_fat, preparing various internal structures for use.
| 0 | On success. No error conditions currently defined. |
Referenced by mount_sd_fat().
| int fs_fat_mount | ( | const char * | mp, |
| kos_blockdev_t * | dev, | ||
| uint32_t | flags ) |
Mount a FAT filesystem in the VFS.
This function mounts an fat filesystem to the specified mount point on the VFS. This function will detect whether or not an FAT filesystem exists on the given block device and mount it only if there is actually an FAT filesystem.
| mp | The path to mount the filesystem at. |
| dev | The block device containing the filesystem. |
| flags | Mount flags. Bitwise OR of values from fat_mount_flags |
| 0 | On success. |
| -1 | On error. |
Referenced by mount_sd_fat().
| int fs_fat_shutdown | ( | void | ) |
Shut down fs_fat.
This function shuts down fs_fat, basically undoing what fs_fat_init() did.
| 0 | On success. No error conditions currently defined. |
Referenced by unmount_sd_fat().
| int fs_fat_sync | ( | const char * | mp | ) |
Sync a FAT filesystem, flushing all pending writes to the block device.
This function completes all pending writes on the filesystem, making sure all data and metadata are in a consistent state on the block device. As both inode and block writes are normally postponed until they are either evicted from the cache or the filesystem is unmounted, doing this periodically may be a good idea if there is a chance that the filesystem will not be unmounted cleanly.
| mp | The mount point of the filesystem to be synced. |
| 0 | On success. |
| -1 | On error. |
| int fs_fat_unmount | ( | const char * | mp | ) |
Unmount a FAT filesystem from the VFS.
This function unmoutns an FAT filesystem that was previously mounted by the fs_fat_mount() function.
| mp | The mount point of the filesystem to be unmounted. |
| 0 | On success. |
| -1 | On error. |
Referenced by unmount_sd_fat().