Turnstone Operating System
Loading...
Searching...
No Matches
fat32.64.c File Reference

FAT32 filesystem implementation. More...

#include <fs.h>
#include <fat.h>
#include <memory.h>
#include <time.h>
#include <random.h>
#include <list.h>
#include <strings.h>
#include <utils.h>
#include <logging.h>

Classes

struct  file_context_t
 
struct  directory_context_t
 
struct  filesystem_context_t
 
struct  fat32_dir_list_iter_extradata_t
 
struct  fat32_dir_list_iter_metadata_t
 

Typedefs

typedef struct file_context_t file_context_t
 
typedef struct directory_context_t directory_context_t
 
typedef struct filesystem_context_t filesystem_context_t
 
typedef struct fat32_dir_list_iter_extradata_t fat32_dir_list_iter_extradata_t
 
typedef struct fat32_dir_list_iter_metadata_t fat32_dir_list_iter_metadata_t
 

Functions

 MODULE ("turnstone.kernel.hw.disk.fs")
 
file_tfat32_new_file (filesystem_t *fs, directory_t *dir, uint32_t dirent_idx, uint32_t clusterno, int64_t size, const path_t *p, time_t ct, time_t lat, time_t lmt)
 
directory_tfat32_new_directory (filesystem_t *fs, uint32_t clusterno, const path_t *p, time_t ct, time_t lat, time_t lmt)
 
path_interface_tfat32_directory_or_file_create (directory_t *parent, const path_t *child, fs_stat_type_t type)
 
uint64_t fat32_get_absulute_lba_from_clusterno (filesystem_t *fs, uint32_t clusterno)
 
uint32_t fat32_count_cluster (filesystem_t *fs, uint32_t clusterno)
 
uint8_t fat32_long_filename_checksum (char_t *file_name)
 
directory_tfat32_create_or_open_directory (directory_t *self, const path_t *p)
 
file_tfat32_create_or_open_file (directory_t *self, const path_t *p)
 
path_interface_tfat32_create_or_open_directory_or_file (directory_t *self, const path_t *p, fs_stat_type_t type)
 
int8_t fat32_write_cluster_data (filesystem_t *fs)
 
directory_tfs_create_or_open_directory (filesystem_t *self, const path_t *p)
 
file_tfs_create_or_open_file (filesystem_t *self, const path_t *p)
 
fat32_dirent_shortname_tfat32_gen_dirents (const path_t *p, fs_stat_type_t type, timeparsed_t *tp, int32_t *ent_cnt)
 
uint32_t fat32_get_empty_cluster (filesystem_t *fs)
 
int8_t fat32_directory_write (directory_t *self, time_t mt)
 
uint32_t fat32_cluster_count (filesystem_t *fs, uint32_t clusterno)
 
const path_tfat32_file_get_path (const file_t *self)
 
int8_t fat32_file_close (file_t *self)
 
int64_t fat32_file_write (file_t *self, uint8_t *buf, int64_t buflen)
 
int64_t fat32_file_read (file_t *self, uint8_t *buf, int64_t buflen)
 
int64_t fat32_file_seek (file_t *self, int64_t pos, file_seek_type_t st)
 
int64_t fat32_file_tell (file_t *self)
 
int8_t fat32_file_flush (file_t *self)
 
fs_stat_type_t fat32_file_get_type (file_t *self)
 
time_t fat32_file_get_create_time (file_t *self)
 
time_t fat32_file_get_last_access_time (file_t *self)
 
time_t fat32_file_get_last_modification_time (file_t *self)
 
const path_tfat32_directory_get_path (const directory_t *self)
 
int8_t fat32_directory_close (directory_t *self)
 
const void * fat32_dir_list_iter_notimpelemented (iterator_t *iter)
 
int8_t fat32_dir_list_iter_destroy (iterator_t *iter)
 
iterator_tfat32_dir_list_iter_next (iterator_t *iter)
 
int8_t fat32_dir_list_iter_end_of_iterator (iterator_t *iter)
 
const void * fat32_dir_list_iter_get_item (iterator_t *iter)
 
const void * fat32_dir_list_iter_get_extra_data (iterator_t *iter)
 
iterator_tfat32_directory_list (directory_t *self)
 
directory_tfat32_directory_create (filesystem_t *fs, uint32_t parent_clusterno, uint32_t clusterno, const path_t *p, time_t ct)
 
fs_stat_type_t fat32_directory_get_type (directory_t *self)
 
time_t fat32_directory_get_create_time (directory_t *self)
 
time_t fat32_directory_get_last_access_time (directory_t *self)
 
time_t fat32_directory_get_last_modification_time (directory_t *self)
 
uint64_t fat32_get_total_size (filesystem_t *self)
 
uint64_t fat32_get_free_size (filesystem_t *self)
 
int8_t fat32_close (filesystem_t *self)
 
fs_stat_tfat32_stat (filesystem_t *self, const path_t *p)
 
int8_t fat32_remove (filesystem_t *self, const path_t *p)
 
directory_tfat32_get_root_directory (filesystem_t *self)
 
filesystem_tfat32_get_or_create_fs (disk_or_partition_t *d, const char_t *volname)
 

Detailed Description

FAT32 filesystem implementation.

This work is licensed under TURNSTONE OS Public License. Please read and understand latest version of Licence.