|
ginnOS
The reference: libc, the libraries and the kernel
|
#include "ext2_internal.h"Functions | |
| bool | read_abs_bytes (block_device_t *disk, uint32_t byte_offset, uint32_t size, void *out, uint8_t *sector_buf) |
| reads bytes from the disk at the specified absolute byte offset and size into the provided output buffer. | |
| bool | read_block (ext2_volume_t *volume, uint32_t block, void *out) |
| reads a block from the EXT2 volume into the provided output buffer. | |
| bool | read_group_desc (ext2_volume_t *volume, uint32_t group, ext2_block_group_desc_t *out_desc) |
| reads the block group descriptor for the specified group from the EXT2 volume into the provided output structure. | |
| bool | write_abs_bytes (block_device_t *disk, uint32_t byte_offset, uint32_t size, const void *in, uint8_t *sector_buf) |
| writes bytes to the disk at the specified absolute byte offset and size from the provided input buffer. | |
| bool | write_block (ext2_volume_t *volume, uint32_t block, const void *in) |
| writes a block to the EXT2 volume from the provided input buffer. | |
| bool | write_group_desc (ext2_volume_t *volume, uint32_t group, const ext2_block_group_desc_t *desc) |
| writes the block group descriptor for the specified group to the EXT2 volume from the provided input structure. | |
| bool | write_superblock (ext2_volume_t *volume) |
| writes the superblock to the EXT2 volume. | |
| bool | read_inode_bitmap (ext2_volume_t *volume, uint32_t group, uint8_t *bitmap) |
| reads the inode bitmap for the specified block group from the EXT2 volume into the provided output buffer. | |
| bool | write_inode_bitmap (ext2_volume_t *volume, uint32_t group, const uint8_t *bitmap) |
| writes the inode bitmap for the specified block group to the EXT2 volume from the provided input buffer. | |
| bool | read_block_bitmap (ext2_volume_t *volume, uint32_t group, uint8_t *bitmap) |
| reads the block bitmap for the specified block group from the EXT2 volume into the provided output buffer. | |
| bool | write_block_bitmap (ext2_volume_t *volume, uint32_t group, const uint8_t *bitmap) |
| writes the block bitmap for the specified block group to the EXT2 volume from the provided input buffer. | |
| bool read_abs_bytes | ( | block_device_t * | disk, |
| uint32_t | byte_offset, | ||
| uint32_t | size, | ||
| void * | out, | ||
| uint8_t * | sector_buf ) |
reads bytes from the disk at the specified absolute byte offset and size into the provided output buffer.
| disk | pointer to the block device representing the disk. |
| byte_offset | the absolute byte offset on the disk to start reading from. |
| size | the number of bytes to read. |
| out | pointer to the output buffer where the read bytes will be stored. |
| sector_buf | scratch buffer for partial-sector reads (must be EXT2_SECTOR_SIZE bytes). |
| bool read_block | ( | ext2_volume_t * | volume, |
| uint32_t | block, | ||
| void * | out ) |
reads a block from the EXT2 volume into the provided output buffer.
| volume | pointer to the ext2_volume_t structure representing the filesystem volume. |
| block | the block number to read from the volume. |
| out | pointer to the output buffer where the read block will be stored. |
| bool read_group_desc | ( | ext2_volume_t * | volume, |
| uint32_t | group, | ||
| ext2_block_group_desc_t * | out_desc ) |
reads the block group descriptor for the specified group from the EXT2 volume into the provided output structure.
| volume | pointer to the ext2_volume_t structure representing the filesystem volume. |
| group | the block group number to read the descriptor for. |
| out_desc | pointer to the ext2_block_group_desc_t structure where the read descriptor will be stored. |
| bool write_abs_bytes | ( | block_device_t * | disk, |
| uint32_t | byte_offset, | ||
| uint32_t | size, | ||
| const void * | in, | ||
| uint8_t * | sector_buf ) |
writes bytes to the disk at the specified absolute byte offset and size from the provided input buffer.
| disk | pointer to the block device representing the disk. |
| byte_offset | the absolute byte offset on the disk to start writing to. |
| size | the number of bytes to write. |
| in | pointer to the input buffer containing the bytes to be written. |
| sector_buf | scratch buffer for partial-sector read-modify-write (must be EXT2_SECTOR_SIZE bytes). |
| bool write_block | ( | ext2_volume_t * | volume, |
| uint32_t | block, | ||
| const void * | in ) |
writes a block to the EXT2 volume from the provided input buffer.
| volume | pointer to the ext2_volume_t structure representing the filesystem volume. |
| block | the block number to write to the volume. |
| in | pointer to the input buffer containing the block data to be written. |
| bool write_group_desc | ( | ext2_volume_t * | volume, |
| uint32_t | group, | ||
| const ext2_block_group_desc_t * | desc ) |
writes the block group descriptor for the specified group to the EXT2 volume from the provided input structure.
| volume | pointer to the ext2_volume_t structure representing the filesystem volume. |
| group | the block group number to write the descriptor for. |
| desc | pointer to the ext2_block_group_desc_t structure containing the descriptor data to be written. |
| bool write_superblock | ( | ext2_volume_t * | volume | ) |
writes the superblock to the EXT2 volume.
| volume | pointer to the ext2_volume_t structure representing the filesystem volume. |
| bool read_inode_bitmap | ( | ext2_volume_t * | volume, |
| uint32_t | group, | ||
| uint8_t * | bitmap ) |
reads the inode bitmap for the specified block group from the EXT2 volume into the provided output buffer.
| volume | pointer to the ext2_volume_t structure representing the filesystem volume. |
| group | the block group number to read the inode bitmap for. |
| bitmap | pointer to the output buffer where the read inode bitmap will be stored. |
| bool write_inode_bitmap | ( | ext2_volume_t * | volume, |
| uint32_t | group, | ||
| const uint8_t * | bitmap ) |
writes the inode bitmap for the specified block group to the EXT2 volume from the provided input buffer.
| volume | pointer to the ext2_volume_t structure representing the filesystem volume. |
| group | the block group number to write the inode bitmap for. |
| bitmap | pointer to the input buffer containing the inode bitmap data to be written. |
| bool read_block_bitmap | ( | ext2_volume_t * | volume, |
| uint32_t | group, | ||
| uint8_t * | bitmap ) |
reads the block bitmap for the specified block group from the EXT2 volume into the provided output buffer.
| volume | pointer to the ext2_volume_t structure representing the filesystem volume. |
| group | the block group number to read the block bitmap for. |
| bitmap | pointer to the output buffer where the read block bitmap will be stored. |
| bool write_block_bitmap | ( | ext2_volume_t * | volume, |
| uint32_t | group, | ||
| const uint8_t * | bitmap ) |
writes the block bitmap for the specified block group to the EXT2 volume from the provided input buffer.
| volume | pointer to the ext2_volume_t structure representing the filesystem volume. |
| group | the block group number to write the block bitmap for. |
| bitmap | pointer to the input buffer containing the block bitmap data to be written. |