|
XenevaOS
|
#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>
Functions | |
| int | Ext2FreeBlock (Ext2Fs *fs, uint32_t block_num) |
| int | Ext2FreeInode (Ext2Fs *fs, uint32_t inode_num) |
| 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) |
| AuVFSNode * | Ext2Open (AuVFSNode *fsys, char *path) |
| AuVFSNode * | Ext2Initialise (AuVDisk *vdisk, char *mountname) |
BSD 2-Clause License
Copyright (c) 2022-2023, Manas Kamal Choudhury All rights reserved.
Author: Pranav Bisht, Prana.nosp@m.v0bi.nosp@m.sht@g.nosp@m.mail.nosp@m..com
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Ext2FindEntry – scans the directory data block for matching name string
| fs | – file system |
| dir_inode | – parsed inode structure we are searching inside |
| name | – the target string we are matching |
Ext2Initialise – initialize the ext2 file system
| vdisk | – Pointer to vdisk structure |
| mountname | – mount file system name |
Ext2Open – acting internal path crawler
| fsys | – pointer to the file system |
| path | – path to the file |
Ext2Read – reads data from a file in the ext2 filesystem
| 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 – reads the block index from a given block
| fs | – the filesystem |
| block_id | – the block id to read from |
| index | – the index within the block to read |