The manual
ginnOS
The reference: libc, the libraries and the kernel
Loading...
Searching...
No Matches
ext2_ops.c File Reference

ext2 implementation of the filesystem operations vtable. More...

#include "fs.h"
#include "ext2_ops.h"
#include "kernel/sync/mutex.h"
#include "kernel/device/device.h"
#include "common/memory.h"

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.

Detailed Description

ext2 implementation of the filesystem operations vtable.

this is the only file in the fs layer that names ext2 functions. it adapts ext2's calls and types to the generic fs_* contract and exposes them as a single fs_ops_t. fs_mount() installs this table; the generic fs.c dispatches through it and never touches ext2 directly.

Function Documentation

◆ ext2_ops_mount()

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.

Parameters
mountfilesystem mount object to initialize.
deviceinitialized block device backend.
Returns
KERR_OK on success, or an error code on failure.