The Linux filesystem library consists of the Linux virtual and real filesystem code along with glue code to export the OSKit filesystem interface (See Chapter 9).
The header file <oskit/fs/linux_filesystems.h> determines which of the real Linux real filesystems, e.g. ext2, iso9660, are compiled into liboskit_linux_fs.a. All the filesystems listed in that file will compile, but only ext2, msdos, vfat, and iso9660 have been tested.
The Linux filesystem library provides two additional interfaces:
client OS filesystem library
This function initializes the Linux fs library, and must be invoked prior to the first call to fs_linux_mount. This function only needs to be invoked once by the client operating system.
All filesystems listed in <oskit/fs/linux_filesystems.h> are initialized.
Returns 0 on success, or an error code specified in <oskit/error.h>, on error.
#include <oskit/fs/linux.h>
oskit_error_t fs_linux_mount(oskit_blkio_t *bio, oskit_u32_t flags, oskit_filesystem_t **out_fs);
client OS filesystem library
This function looks in the partition described by bio for a filesystem superblock, calls the corresponding filesystem mount code, and returns a handle to an oskit_filesystem_t for this filesystem.
This function may be used multiple times by a client operating system to mount multiple file systems.
Note that this function does not graft the filesystem into a namespace; oskit_dir_reparent or other layers may be used for that purpose.
Typically, this interface is not exported to clients, and is only used by the client operating system during initialization.
This function is a wrapper for Linux’s mount_root.
Returns 0 on success, or an error code specified in <oskit/error.h>, on error.