#include <oskit/fs/fsnamespace.h>oskit_error_t oskit_fsnamespace_mount(oskit_fsnamespace_t *f, const char *pathname, oskit_file_t *filesystem);
The mount method provides the BSD-like ability to compose a filesystem namespace out of individual filesystems. Since the underlying oskit_dir COM object does not support mountpoints, this capability must be provided at a higher level. The mount method requires a valid pathname (which must be a directory) in the current filesystem on which to mount the new filesystem. Subsequent pathname translation that crosses the pathname will instead be redirected into the new filesystem. For example, one could mount a BMOD filesystem (see Section 13.20) at an arbitrary point in a regular filesystem with the following code fragment:oskit_fsnamespace_mount(fsn, "/bmod", (oskit_file_t *) start_bmod());
- f
- The OSKit filesysem namespace interface object.
- pathname
- The pathname of the directory to mount over.
- filesystem
- The oskit_file COM interface for the mounted subtree.
Returns 0 on success, or an error code specified in <oskit/error.h>, on error.