The NetBSD filesystem library consists of the NetBSD filesystem code and a collection of glue code which encapsulates the NetBSD code within the OSKit filesystem framework.
The NetBSD filesystem library provides two additional interfaces:
client OS filesystem library
This function initializes the NetBSD fs library, and must be invoked prior to the first call to fs_netbsd_mount. This function only needs to be invoked once by the client operating system.
Returns 0 on success, or an error code specified in <oskit/error.h>, on error.
#include <oskit/fs/netbsd.h>
oskit_error_t fs_netbsd_mount(oskit_blkio_t *bio, oskit_u32_t flags, oskit_filesystem_t **out_fs);
client OS filesystem library
This function mounts a FFS filesystem from the partition described by bio, 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.
Returns 0 on success, or an error code specified in <oskit/error.h>, on error.