RTEMS  5.1
Macros | Functions
fat.c File Reference

Low-level Operations on a Volume with a DOSFS FAT filesystem. More...

#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <stdlib.h>
#include <stdint.h>
#include <rtems/libio_.h>
#include "fat.h"
#include "fat_fat_operations.h"

Macros

#define FAT_UNIQ_INO_BASE   0x0FFFFF00
 
#define FAT_UNIQ_INO_IS_BUSY(index, arr)   (((arr)[((index)>>3)]>>((index) & (8-1))) & 0x01)
 
#define FAT_SET_UNIQ_INO_BUSY(index, arr)   ((arr)[((index)>>3)] |= (0x01<<((index) & (8-1))))
 
#define FAT_SET_UNIQ_INO_FREE(index, arr)   ((arr)[((index)>>3)] &= (~(0x01<<((index) & (8-1)))))
 

Functions

int fat_buf_access (fat_fs_info_t *fs_info, const uint32_t sec_num, const int op_type, uint8_t **sec_buf)
 
int fat_buf_release (fat_fs_info_t *fs_info)
 
ssize_t _fat_block_read (fat_fs_info_t *fs_info, uint32_t start, uint32_t offset, uint32_t count, void *buff)
 
ssize_t fat_sector_write (fat_fs_info_t *fs_info, uint32_t start, uint32_t offset, uint32_t count, const void *buff)
 
ssize_t fat_cluster_set (fat_fs_info_t *fs_info, const uint32_t start_cln, const uint32_t offset, const uint32_t count, const uint8_t pattern)
 
ssize_t fat_cluster_write (fat_fs_info_t *fs_info, const uint32_t start_cln, const uint32_t offset, const uint32_t count, const void *buff)
 
int fat_init_volume_info (fat_fs_info_t *fs_info, const char *device)
 
int fat_sync (fat_fs_info_t *fs_info)
 
int fat_shutdown_drive (fat_fs_info_t *fs_info)
 
int fat_init_clusters_chain (fat_fs_info_t *fs_info, uint32_t start_cln)
 
uint32_t fat_get_unique_ino (fat_fs_info_t *fs_info)
 
void fat_free_unique_ino (fat_fs_info_t *fs_info, uint32_t ino)
 
bool fat_ino_is_unique (fat_fs_info_t *fs_info, uint32_t ino)
 

Detailed Description

Low-level Operations on a Volume with a DOSFS FAT filesystem.