XenevaOS
Loading...
Searching...
No Matches
Functions
Ext2.c File Reference
#include <Fs/vfs.h>
#include <Fs/vdisk.h>
#include <Mm/kmalloc.h>
#include <Mm/pmmngr.h>
#include <Drivers/uart.h>
#include <string.h>
#include <aucon.h>
#include <Fs/Ext2/ext2.h>
#include <_null.h>
Include dependency graph for Ext2.c:

Functions

uint32_t Ext2FindEntry (Ext2Fs *fs, Ext2Inode *dir_inode, const char *name)
 
int Ext2ReadInode (Ext2Fs *fs, uint32_t inode_num, Ext2Inode *out_inode)
 
uint32_t Ext2ReadBlockIndex (Ext2Fs *fs, uint32_t block_id, uint32_t index)
 
size_t Ext2Read (AuVFSNode *node, AuVFSNode *file, uint64_t *buffer, uint32_t length)
 
AuVFSNodeExt2Open (AuVFSNode *fsys, char *path)
 
AuVFSNodeExt2Initialise (AuVDisk *vdisk, char *mountname)
 

Function Documentation

◆ Ext2FindEntry()

uint32_t Ext2FindEntry ( Ext2Fs fs,
Ext2Inode dir_inode,
const char *  name 
)

Ext2FindEntry – scans the directory data block for matching name string

Parameters
fs– file system
dir_inode– parsed inode structure we are searching inside
name– the target string we are matching

◆ Ext2Initialise()

AuVFSNode * Ext2Initialise ( AuVDisk vdisk,
char *  mountname 
)

Ext2Initialise – initialize the ext2 file system

Parameters
vdisk– Pointer to vdisk structure
mountname– mount file system name

◆ Ext2Open()

AuVFSNode * Ext2Open ( AuVFSNode fsys,
char *  path 
)

Ext2Open – acting internal path crawler

Parameters
fsys– pointer to the file system
path– path to the file

◆ Ext2Read()

size_t Ext2Read ( AuVFSNode node,
AuVFSNode file,
uint64_t buffer,
uint32_t  length 
)

Ext2Read – reads data from a file in the ext2 filesystem

Parameters
node– the filesystem node
file– the file node to read from
buffer– the buffer to store read data
length– the number of bytes to read

◆ Ext2ReadBlockIndex()

uint32_t Ext2ReadBlockIndex ( Ext2Fs fs,
uint32_t  block_id,
uint32_t  index 
)

Ext2ReadBlockIndex – reads the block index from a given block

Parameters
fs– the filesystem
block_id– the block id to read from
index– the index within the block to read

◆ Ext2ReadInode()

int Ext2ReadInode ( Ext2Fs fs,
uint32_t  inode_num,
Ext2Inode out_inode 
)

Ext2ReadInode – reads the inode and updates the provided new inode

Parameters
fs– the filesystem
inode_num– inode number to read
out_inode– inode to place the readings