#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.
- bio
- Describes the partition containing a filesytem. Can be the whole disk like that returned from oskit_linux_block_open, or a subset of one like what is given by diskpart_blkio_lookup_bsd_string.
- flags
- The mount flags. These are formed by or'ing the following values:
- OSKIT_FS_RDONLY
- Read only filesystem
- OSKIT_FS_NOEXEC
- Can't exec from filesystem
- OSKIT_FS_NOSUID
- Don't honor setuid bits on fs
- OSKIT_FS_NODEV
- Don't interpret special files
- out_fs
- Upon success, is set to point to an oskit_filesystem_t for this filesystem.
Returns 0 on success, or an error code specified in <oskit/error.h>, on error.