UbixOS
2.0
|
#include <string.h>
#include "fat_defs.h"
#include "fat_access.h"
#include "fat_table.h"
#include "fat_write.h"
#include "fat_string.h"
#include "fat_misc.h"
Go to the source code of this file.
Functions | |
uint32 | fatfs_get_file_entry (struct fatfs *fs, uint32 Cluster, char *name_to_find, struct fat_dir_entry *sfEntry) |
uint32 | fatfs_get_root_cluster (struct fatfs *fs) |
int | fatfs_init (struct fatfs *fs) |
uint32 | fatfs_lba_of_cluster (struct fatfs *fs, uint32 Cluster_Number) |
int | fatfs_list_directory_next (struct fatfs *fs, struct fs_dir_list_status *dirls, struct fs_dir_ent *entry) |
void | fatfs_list_directory_start (struct fatfs *fs, struct fs_dir_list_status *dirls, uint32 StartCluster) |
int | fatfs_mark_file_deleted (struct fatfs *fs, uint32 Cluster, char *shortname) |
int | fatfs_read_sector (struct fatfs *fs, uint32 cluster, uint32 sector, uint8 *target) |
int | fatfs_sector_read (struct fatfs *fs, uint32 lba, uint8 *target, uint32 count) |
int | fatfs_sector_reader (struct fatfs *fs, uint32 start_cluster, uint32 offset, uint8 *target) |
int | fatfs_sector_write (struct fatfs *fs, uint32 lba, uint8 *target, uint32 count) |
int | fatfs_sfn_exists (struct fatfs *fs, uint32 Cluster, char *shortname) |
void | fatfs_show_details (struct fatfs *fs) |
int | fatfs_update_file_length (struct fatfs *fs, uint32 Cluster, char *shortname, uint32 fileLength) |
int | fatfs_write_sector (struct fatfs *fs, uint32 cluster, uint32 sector, uint8 *target) |
uint32 fatfs_get_file_entry | ( | struct fatfs * | fs, |
uint32 | Cluster, | ||
char * | name_to_find, | ||
struct fat_dir_entry * | sfEntry | ||
) |
Definition at line 380 of file fat_access.c.
References FAT_DIR_ENTRIES_PER_SECTOR, FAT_DIR_ENTRY_SIZE, fatfs_compare_names(), fatfs_entry_lfn_exists(), fatfs_entry_lfn_invalid(), fatfs_entry_lfn_text(), fatfs_entry_sfn_only(), fatfs_lfn_cache_entry(), fatfs_lfn_cache_get(), fatfs_lfn_cache_init(), fatfs_sector_reader(), memcpy(), memset(), and NULL.
Definition at line 373 of file fat_access.c.
int fatfs_init | ( | struct fatfs * | fs | ) |
Definition at line 43 of file fat_access.c.
References BPB_BYTSPERSEC, BPB_FAT32_FATSZ32, BPB_FAT32_FSINFO, BPB_FAT32_ROOTCLUS, BPB_FATSZ16, BPB_NUMFATS, BPB_ROOTENTCNT, BPB_RSVDSECCNT, BPB_SECPERCLUS, BPB_TOTSEC16, BPB_TOTSEC32, FAT32_INVALID_CLUSTER, FAT_DIR_ENTRY_SIZE, FAT_INIT_ENDIAN_ERROR, FAT_INIT_INVALID_SECTOR_SIZE, FAT_INIT_INVALID_SIGNATURE, FAT_INIT_MEDIA_ACCESS_ERROR, FAT_INIT_OK, FAT_INIT_STRUCT_PACKING, FAT_INIT_WRONG_FILESYS_TYPE, FAT_SECTOR_SIZE, FAT_TYPE_16, FAT_TYPE_32, fatfs_fat_init(), GET_16BIT_WORD, GET_32BIT_WORD, PARTITION1_LBA_BEGIN_LOCATION, PARTITION1_TYPECODE_LOCATION, SIGNATURE_POSITION, and SIGNATURE_VALUE.
Definition at line 191 of file fat_access.c.
References FAT_SECTOR_SIZE, and FAT_TYPE_16.
Referenced by fatfs_read_sector(), fatfs_sector_reader(), and fatfs_write_sector().
int fatfs_list_directory_next | ( | struct fatfs * | fs, |
struct fs_dir_list_status * | dirls, | ||
struct fs_dir_ent * | entry | ||
) |
Definition at line 719 of file fat_access.c.
References fs_dir_list_status::cluster, fs_dir_ent::cluster, FAT_DIR_ENTRIES_PER_SECTOR, FAT_DIR_ENTRY_SIZE, FAT_HTONL, FAT_HTONS, fatfs_entry_is_dir(), fatfs_entry_lfn_exists(), fatfs_entry_lfn_invalid(), fatfs_entry_lfn_text(), fatfs_entry_sfn_only(), fatfs_get_sfn_display_name(), fatfs_lfn_cache_entry(), fatfs_lfn_cache_get(), fatfs_lfn_cache_init(), FATFS_MAX_LONG_FILENAME, fatfs_sector_reader(), fs_dir_ent::filename, fs_dir_ent::is_dir, memset(), NULL, fs_dir_list_status::offset, fs_dir_list_status::sector, fs_dir_ent::size, and strncpy().
void fatfs_list_directory_start | ( | struct fatfs * | fs, |
struct fs_dir_list_status * | dirls, | ||
uint32 | StartCluster | ||
) |
Definition at line 708 of file fat_access.c.
References fs_dir_list_status::cluster, fs_dir_list_status::offset, and fs_dir_list_status::sector.
Definition at line 643 of file fat_access.c.
References FAT_DIR_ENTRIES_PER_SECTOR, FAT_DIR_ENTRY_SIZE, fatfs_entry_lfn_invalid(), fatfs_entry_lfn_text(), fatfs_entry_sfn_only(), fatfs_sector_reader(), fatfs_update_timestamps(), FILE_HEADER_DELETED, memcpy(), and strncmp().
Definition at line 263 of file fat_access.c.
References FAT_TYPE_16, and fatfs_lba_of_cluster().
Definition at line 200 of file fat_access.c.
Definition at line 213 of file fat_access.c.
References FAT32_LAST_CLUSTER, FAT_TYPE_16, fatfs_find_next_cluster(), and fatfs_lba_of_cluster().
Referenced by fatfs_get_file_entry(), fatfs_list_directory_next(), fatfs_mark_file_deleted(), fatfs_sfn_exists(), and fatfs_update_file_length().
Definition at line 206 of file fat_access.c.
Definition at line 478 of file fat_access.c.
References FAT_DIR_ENTRIES_PER_SECTOR, FAT_DIR_ENTRY_SIZE, fatfs_entry_lfn_invalid(), fatfs_entry_lfn_text(), fatfs_entry_sfn_only(), fatfs_sector_reader(), and strncmp().
void fatfs_show_details | ( | struct fatfs * | fs | ) |
Definition at line 362 of file fat_access.c.
References FAT_PRINTF, and FAT_TYPE_32.
int fatfs_update_file_length | ( | struct fatfs * | fs, |
uint32 | Cluster, | ||
char * | shortname, | ||
uint32 | fileLength | ||
) |
Definition at line 578 of file fat_access.c.
References FAT_DIR_ENTRIES_PER_SECTOR, FAT_DIR_ENTRY_SIZE, FAT_HTONL, fatfs_entry_lfn_invalid(), fatfs_entry_lfn_text(), fatfs_entry_sfn_only(), fatfs_sector_reader(), fatfs_update_timestamps(), memcpy(), and strncmp().
Definition at line 311 of file fat_access.c.
References FAT_TYPE_16, and fatfs_lba_of_cluster().