|
ginnOS
The reference: libc, the libraries and the kernel
|
Go to the source code of this file.
Typedefs | |
| typedef struct fs_mount | fs_mount_t |
| filesystem operations vtable. | |
Functions | |
| kerr_t | ext2_ops_mount (fs_mount_t *mount, block_device_t *device) |
| initialize an ext2 filesystem on a block device and install its operations vtable on the mount. | |
| typedef struct fs_mount fs_mount_t |
filesystem operations vtable.
each filesystem type (ext2 today; procfs/tmpfs/FAT32 later) provides one of these so the generic fs_* layer never names a concrete filesystem. a mount points at its filesystem's ops; every open file carries the same pointer so file-level calls dispatch without consulting the mount again.
mount is the only entry point that is not in the vtable: fs_mount() selects the filesystem (currently always ext2) and installs its ops.
| kerr_t ext2_ops_mount | ( | fs_mount_t * | mount, |
| block_device_t * | device ) |
initialize an ext2 filesystem on a block device and install its operations vtable on the mount.
after this succeeds, all access goes through mount->ops.
| mount | filesystem mount object to initialize. |
| device | initialized block device backend. |