|
PatchworkOS
321f6ec
A non-POSIX operating system.
|
Mount point. More...
Mount point.
A mount represents a location that a superblock is mounted to. It links a superblock (the mounted filesystem) to a mountpoint (a dentry in another filesystem).
Data Structures | |
| struct | mount_t |
| Mount structure. More... | |
Macros | |
| #define | MOUNT_IS_ROOT(mount) ((mount)->parent == (mount)) |
| Macro to check if a mount is the root filesystem. | |
Typedefs | |
| typedef uint64_t | mount_id_t |
| Mount ID type. | |
Functions | |
| mount_t * | mount_new (superblock_t *superblock, dentry_t *source, dentry_t *target, mount_t *parent, mode_t mode) |
| Create a new mount. | |
| typedef uint64_t mount_id_t |
| mount_t * mount_new | ( | superblock_t * | superblock, |
| dentry_t * | source, | ||
| dentry_t * | target, | ||
| mount_t * | parent, | ||
| mode_t | mode | ||
| ) |
Create a new mount.
This does not add the mount to the mount cache, that must be done separately with vfs_add_mount().
There is no mount_free() instead use UNREF().
| superblock | The superblock of the mounted filesystem. |
| source | The dentry to appear at target once mounted, usually the root dentry of the mounted filesystem. |
| target | The dentry which the source is mounted to, can be NULL for the root filesystem. |
| parent | The parent mount, can be NULL for the root filesystem. |
| mode | Specifies the maximum permissions for this mount and if it is a directory or a file. |
NULL and errno is set to:EINVAL: Invalid parameters.ENOENT: Source or target dentry is negative.ENOTDIR: Source is a file but mode specifies a directory.EISDIR: Source is a directory but mode specifies a file.ENOMEM: Out of memory. Definition at line 39 of file mount.c.