Go to the source code of this file.
|
| struct fat16_header_primary | __attribute__ ((packed)) |
| struct filesystem * | fat16_init_filesystem () |
| | Prepares filesystem struct for generic filesystem driver use.
|
| int | fat16_resolve (struct disk *disk) |
| | FAT16 filesystem resolver.
|
| void * | fat16_open (void *private_fs, struct path_part *path, FILE_MODE mode) |
| | FAT16 Implementation of fopen.
|
| int | fat16_read (void *private_fs, void *desc, uint32_t size, uint32_t nmemb, char *out) |
| | FAT16 Implementation of fread.
|
| int | fat16_write (void *private_fs, void *desc, uint32_t size, uint32_t nmemb, char *in) |
| int | fat16_seek (void *desc, uint32_t offset, FILE_SEEK_MODE seek_mode) |
| | FAT16 Implementation of fseek.
|
| int | fat16_stat (void *desc, struct file_stat *stat) |
| | FAT16 Implementation of fstat.
|
| int | fat16_close (void *desc) |
| | FAT16 Implementation of fclose.
|
◆ DEBUG_FAT16
◆ FAT16_BAD_SECTOR
| #define FAT16_BAD_SECTOR 0xFF7 |
◆ FAT16_FAT_ENTRY_SIZE
| #define FAT16_FAT_ENTRY_SIZE 0x02 |
◆ FAT16_SIGNATURE
| #define FAT16_SIGNATURE 0x29 |
◆ FAT16_UNUSED
| #define FAT16_UNUSED 0x00 |
◆ FAT_FILE_ARCHVED
| #define FAT_FILE_ARCHVED 0x20 |
◆ FAT_FILE_DEVICE
| #define FAT_FILE_DEVICE 0x40 |
◆ FAT_FILE_HIDDEN
| #define FAT_FILE_HIDDEN 0x02 |
◆ FAT_FILE_LONGNAME
◆ FAT_FILE_READONLY
| #define FAT_FILE_READONLY 0x01 |
◆ FAT_FILE_RESERVED
| #define FAT_FILE_RESERVED 0x80 |
◆ FAT_FILE_SUBDIRECTORY
| #define FAT_FILE_SUBDIRECTORY 0x10 |
◆ FAT_FILE_SYSTEM
| #define FAT_FILE_SYSTEM 0x04 |
◆ FAT_FILE_VOLUME_LABEL
| #define FAT_FILE_VOLUME_LABEL 0x08 |
◆ FAT_ITEM_TYPE_DIRECTORY
| #define FAT_ITEM_TYPE_DIRECTORY 0 |
◆ FAT_ITEM_TYPE_FILE
| #define FAT_ITEM_TYPE_FILE 1 |
◆ FAT_ITEM_TYPE
◆ __attribute__()
◆ fat16_close()
| int fat16_close |
( |
void * | desc | ) |
|
FAT16 Implementation of fclose.
- Parameters
-
| desc | Internal file descriptor |
- Returns
- int Status
References ALL_OK, and kdebug.
◆ fat16_init_filesystem()
Prepares filesystem struct for generic filesystem driver use.
- Returns
- struct filesystem*
References fat16_fs, and strcpy().
◆ fat16_open()
◆ fat16_read()
| int fat16_read |
( |
void * | private_fs, |
|
|
void * | desc, |
|
|
uint32_t | size, |
|
|
uint32_t | nmemb, |
|
|
char * | out ) |
◆ fat16_resolve()
| int fat16_resolve |
( |
struct disk * | disk | ) |
|
FAT16 filesystem resolver.
- Parameters
-
- Returns
- int Status
References ALL_OK, diskstreamer_close(), diskstreamer_new(), diskstreamer_read(), diskstreamer_seek(), EIO, ENOMEM, fat_header::fat_header_extended::extended, fat16_fs, disk::filesystem, disk::fs_private, fat_private::header, disk::id, kdebug, kzalloc(), fat_private::partition_offset, fat_private::root_directory, disk::sector_size, fat_header::shared, fat16_header_extended::signature, partition_entry::starting_lba, and type.
◆ fat16_seek()
| int fat16_seek |
( |
void * | desc, |
|
|
uint32_t | offset, |
|
|
FILE_SEEK_MODE | seek_mode ) |
FAT16 Implementation of fseek.
- Parameters
-
| desc | Internal file descriptor |
| offset | Offset |
| seek_mode | Seek mode (SEEK_SET for absolute, SEEK_CUR for relative) |
- Returns
- int Status
References ALL_OK, EINVARG, FAT_ITEM_TYPE_FILE, fat_file_descriptor::file, fat_item::file, fat_file::filesize, kdebug, offset, fat_file_descriptor::pos, SEEK_CUR, SEEK_END, SEEK_SET, and fat_item::type.
◆ fat16_stat()
| int fat16_stat |
( |
void * | desc, |
|
|
struct file_stat * | stat ) |
FAT16 Implementation of fstat.
- Parameters
-
| desc | Internal file descriptor |
| stat | Output fstat struct |
- Returns
- int Status
References ALL_OK, assert_not_reached, fat_file::attribute, FAT_FILE_READONLY, FAT_ITEM_TYPE_DIRECTORY, FAT_ITEM_TYPE_FILE, fat_file_descriptor::file, fat_item::file, FILE_STAT_FOLDER, FILE_STAT_READ_ONLY, fat_file::filesize, file_stat::filesize, file_stat::flags, kdebug, and fat_item::type.
◆ fat16_write()
| int fat16_write |
( |
void * | private_fs, |
|
|
void * | desc, |
|
|
uint32_t | size, |
|
|
uint32_t | nmemb, |
|
|
char * | in ) |
◆ __attribute__
◆ attribute
◆ bytes_per_sector
| uint16_t bytes_per_sector |
◆ creation_date
◆ creation_time
◆ creation_time_tenths_of_a_sec
| uint8_t creation_time_tenths_of_a_sec |
◆ drive_number
◆ ext
◆ fat_copies
◆ filename
◆ filesize
◆ hidden_sectors
◆ high_16bits_first_cluster
| uint16_t high_16bits_first_cluster |
◆ jmp_short
◆ last_access
◆ last_mod_date
◆ last_mod_time
◆ low_16bits_first_cluster
| uint16_t low_16bits_first_cluster |
◆ media_type
◆ number_of_heads
◆ numeber_of_sectors
| uint16_t numeber_of_sectors |
◆ oem_identifier
| uint8_t oem_identifier[8] |
◆ primary
◆ reserved
◆ reserved_sectors
| uint16_t reserved_sectors |
◆ root_dir_entries
| uint16_t root_dir_entries |
◆ sectors_big
◆ sectors_per_cluster
| uint8_t sectors_per_cluster |
◆ sectors_per_fat
◆ sectors_per_track
| uint16_t sectors_per_track |
◆ shared
◆ signature
◆ system_id_string
| uint8_t system_id_string[8] |
◆ volume_id
◆ volume_id_string
| uint8_t volume_id_string[11] |
◆ win_nt_bit