Contains descriptors_table struct and its methods. More...
Go to the source code of this file.
Functions | |
struct | __attribute__ ((__packed__)) descriptors_table |
Struct for represent DT Contains all information about descriptor table. | |
void | init_descriptors_table (struct descriptors_table *descriptors_table, const struct superblock *superblock) |
Constructor of descriptors_table Init descriptors table with metadata from superblock. More... | |
void | destruct_descriptors_table (struct descriptors_table *descriptors_table, const struct superblock *superblock) |
Destructor of superblock. More... | |
ssize_t | read_descriptors_table (int fd, struct descriptors_table *descriptors_table, const struct superblock *superblock) |
Read descriptors_table from memory. More... | |
ssize_t | write_descriptor_table (int fd, struct descriptors_table *descriptors_table, const struct superblock *superblock) |
Write descriptors_table to memory. More... | |
int | reserve_descriptor (struct descriptors_table *descriptors_table, uint16_t inode_id, const struct superblock *superblock) |
Occupy descriptor for inode_id. More... | |
int | free_descriptor (struct descriptors_table *descriptors_table, uint16_t fd, const struct superblock *superblock) |
Release descriptor for inode_id. More... | |
uint16_t | sizeof_descriptors_table (const struct superblock *superblock) |
Sizeof descriptors_table. More... | |
Contains descriptors_table struct and its methods.
Definition in file descriptors_table.h.
void destruct_descriptors_table | ( | struct descriptors_table * | descriptors_table, |
const struct superblock * | superblock | ||
) |
Destructor of superblock.
descriptors_table | |
superblock |
Definition at line 23 of file descriptors_table.c.
int free_descriptor | ( | struct descriptors_table * | descriptors_table, |
uint16_t | fd, | ||
const struct superblock * | superblock | ||
) |
Release descriptor for inode_id.
descriptors_table | |
fd | fd to release |
superblock |
Definition at line 126 of file descriptors_table.c.
void init_descriptors_table | ( | struct descriptors_table * | descriptors_table, |
const struct superblock * | superblock | ||
) |
Constructor of descriptors_table Init descriptors table with metadata from superblock.
descriptors_table | |
superblock |
Definition at line 11 of file descriptors_table.c.
ssize_t read_descriptors_table | ( | int | fd, |
struct descriptors_table * | descriptors_table, | ||
const struct superblock * | superblock | ||
) |
Read descriptors_table from memory.
fd | opened fd |
descriptors_table | |
superblock |
Definition at line 30 of file descriptors_table.c.
int reserve_descriptor | ( | struct descriptors_table * | descriptors_table, |
uint16_t | inode_id, | ||
const struct superblock * | superblock | ||
) |
Occupy descriptor for inode_id.
descriptors_table | |
inode_id | |
superblock |
Definition at line 103 of file descriptors_table.c.
uint16_t sizeof_descriptors_table | ( | const struct superblock * | superblock | ) |
Sizeof descriptors_table.
superblock |
Definition at line 141 of file descriptors_table.c.
ssize_t write_descriptor_table | ( | int | fd, |
struct descriptors_table * | descriptors_table, | ||
const struct superblock * | superblock | ||
) |
Write descriptors_table to memory.
fd | opened fd |
descriptors_table | |
superblock |
Definition at line 68 of file descriptors_table.c.