|
ginnOS
The reference: libc, the libraries and the kernel
|
#include "ext2_internal.h"Functions | |
| bool | inode_is_dir (const ext2_inode_t *inode) |
| determines if a given inode represents a directory by checking its mode against the directory file type constant. | |
| bool | inode_is_regular (const ext2_inode_t *inode) |
| determines if a given inode represents a regular file by checking its mode against the regular file type constant. | |
| bool | inode_is_directory (const ext2_inode_t *inode) |
| determines if a given inode represents a directory by checking its mode against the directory file type constant. | |
| uint8_t | inode_to_file_type (const ext2_inode_t *inode) |
| maps an inode's mode to the corresponding EXT2 file type constant, returning the appropriate value for directory or regular file types, or 0 for unsupported types. | |
| kerr_t | find_in_directory (ext2_volume_t *volume, uint32_t dir_inode_number, const char *name, uint32_t name_len, uint32_t *inode_out) |
| searches for a directory entry with a specific name within a given directory inode, returning the inode number of the found entry if it exists. | |
| bool | resolve_data_block (ext2_volume_t *volume, const ext2_inode_t *inode, uint32_t logical_block_index, uint32_t *physical_block_out) |
| resolves a logical block index within an inode to its corresponding physical block number on disk, handling direct, single indirect, double indirect, and triple indirect block addressing as defined by the EXT2 filesystem structure. | |
| kerr_t | ext2_read_inode (ext2_volume_t *volume, uint32_t inode_number, ext2_inode_t *inode_out) |
| read one inode by inode number. | |
| kerr_t | ext2_list_directory (ext2_volume_t *volume, uint32_t inode_number) |
| list entries in a directory inode. | |
| kerr_t | ext2_lookup_path (ext2_volume_t *volume, const char *path, uint32_t *inode_out) |
| resolve an absolute path to an inode. | |
| bool inode_is_dir | ( | const ext2_inode_t * | inode | ) |
determines if a given inode represents a directory by checking its mode against the directory file type constant.
| inode | pointer to the ext2_inode_t structure to be checked. |
| bool inode_is_regular | ( | const ext2_inode_t * | inode | ) |
determines if a given inode represents a regular file by checking its mode against the regular file type constant.
| inode | pointer to the ext2_inode_t structure to be checked. |
| bool inode_is_directory | ( | const ext2_inode_t * | inode | ) |
determines if a given inode represents a directory by checking its mode against the directory file type constant.
| inode | pointer to the ext2_inode_t structure to be checked. |
| uint8_t inode_to_file_type | ( | const ext2_inode_t * | inode | ) |
maps an inode's mode to the corresponding EXT2 file type constant, returning the appropriate value for directory or regular file types, or 0 for unsupported types.
| inode | pointer to the ext2_inode_t structure whose file type is to be determined. |
| kerr_t find_in_directory | ( | ext2_volume_t * | volume, |
| uint32_t | dir_inode_number, | ||
| const char * | name, | ||
| uint32_t | name_len, | ||
| uint32_t * | inode_out ) |
searches for a directory entry with a specific name within a given directory inode, returning the inode number of the found entry if it exists.
| volume | pointer to the ext2_volume_t structure representing the filesystem volume. |
| dir_inode_number | the inode number of the directory to search within. |
| name | the name of the directory entry to search for. |
| name_len | the length of the name to search for. |
| inode_out | pointer to a variable where the inode number of the found entry will be stored if the entry is found. |
| bool resolve_data_block | ( | ext2_volume_t * | volume, |
| const ext2_inode_t * | inode, | ||
| uint32_t | logical_block_index, | ||
| uint32_t * | physical_block_out ) |
resolves a logical block index within an inode to its corresponding physical block number on disk, handling direct, single indirect, double indirect, and triple indirect block addressing as defined by the EXT2 filesystem structure.
| volume | pointer to the ext2_volume_t structure representing the filesystem volume. |
| inode | pointer to the ext2_inode_t structure representing the inode whose block is being resolved. |
| logical_block_index | the logical block index to resolve (0-based). |
| physical_block_out | pointer to a variable where the resolved physical block number will be stored. |
| kerr_t ext2_read_inode | ( | ext2_volume_t * | volume, |
| uint32_t | inode_number, | ||
| ext2_inode_t * | inode_out ) |
read one inode by inode number.
| volume | initialized ext2 volume. |
| inode_number | inode to read. |
| inode_out | output inode. |
| kerr_t ext2_list_directory | ( | ext2_volume_t * | volume, |
| uint32_t | inode_number ) |
list entries in a directory inode.
| volume | initialized ext2 volume. |
| inode_number | directory inode number. |
| kerr_t ext2_lookup_path | ( | ext2_volume_t * | volume, |
| const char * | path, | ||
| uint32_t * | inode_out ) |
resolve an absolute path to an inode.
| volume | initialized ext2 volume. |
| path | absolute path. |
| inode_out | resolved inode. |