VFS driver for accessing romdisks binaries
More...
VFS driver for accessing romdisks binaries
◆ fs_romdisk_mount()
int fs_romdisk_mount |
( |
const char * | mountpoint, |
|
|
const uint8 * | img, |
|
|
int | own_buffer ) |
Mount a ROMFS image as a new filesystem.
This function will mount a ROMFS image that has been loaded into memory to the specified mountpoint.
- Parameters
-
mountpoint | The directory to mount this romdisk on |
img | The ROMFS image |
own_buffer | If 0, you are still responsible for img, and must free it if appropriate. If non-zero, img will be freed when it is unmounted |
- Return values
-
0 | On success |
-1 | If fs_romdisk_init not called |
-2 | If img is invalid |
-3 | If a malloc fails |
◆ fs_romdisk_unmount()
int fs_romdisk_unmount |
( |
const char * | mountpoint | ) |
|
Unmount a ROMFS image.
This function unmounts a ROMFS image that has been previously mounted with fs_romdisk_mount(). This function does not check for open files on the fs, so make sure that all files have been closed before calling it. If the VFS owns the buffer (own_buffer was non-zero when you called the mount function) then this function will also free the buffer.
- Parameters
-
mountpoint | The ROMFS to unmount |
- Return values
-
- Error Conditions:
- ENOENT - no such ROMFS was mounted