UbixOS
2.0
|
#include <string.h>
#include "fat_defs.h"
#include "fat_access.h"
#include "fat_table.h"
#include "fat_write.h"
#include "fat_misc.h"
#include "fat_string.h"
#include "fat_filelib.h"
#include "fat_cache.h"
Go to the source code of this file.
Macros | |
#define | CHECK_FL_INIT() { if (_filelib_init==0) fl_init(); } |
#define | FL_LOCK(a) do { if ((a)->fl_lock) (a)->fl_lock(); } while (0) |
#define | FL_UNLOCK(a) do { if ((a)->fl_unlock) (a)->fl_unlock(); } while (0) |
Functions | |
void | fl_attach_locks (void(*lock)(void), void(*unlock)(void)) |
int | fl_attach_media (fn_diskio_read rd, fn_diskio_write wr) |
int | fl_closedir (FL_DIR *dir) |
int | fl_createdirectory (const char *path) |
void | fl_fclose (void *f) |
int | fl_feof (void *f) |
int | fl_fflush (void *f) |
int | fl_fgetc (void *f) |
int | fl_fgetpos (void *f, uint32 *position) |
char * | fl_fgets (char *s, int n, void *f) |
void * | fl_fopen (const char *path, const char *mode) |
int | fl_format (uint32 volume_sectors, const char *name) |
int | fl_fputc (int c, void *f) |
int | fl_fputs (const char *str, void *f) |
int | fl_fread (void *buffer, int size, int length, void *f) |
int | fl_fseek (void *f, long offset, int origin) |
long | fl_ftell (void *f) |
int | fl_fwrite (const void *data, int size, int count, void *f) |
void | fl_init (void) |
int | fl_is_dir (const char *path) |
void | fl_listdirectory (const char *path) |
FL_DIR * | fl_opendir (const char *path, FL_DIR *dir) |
int | fl_readdir (FL_DIR *dirls, fl_dirent *entry) |
int | fl_remove (const char *filename) |
void | fl_shutdown (void) |
#define CHECK_FL_INIT | ( | ) | { if (_filelib_init==0) fl_init(); } |
Definition at line 58 of file fat_filelib.c.
#define FL_LOCK | ( | a | ) | do { if ((a)->fl_lock) (a)->fl_lock(); } while (0) |
Definition at line 60 of file fat_filelib.c.
#define FL_UNLOCK | ( | a | ) | do { if ((a)->fl_unlock) (a)->fl_unlock(); } while (0) |
Definition at line 61 of file fat_filelib.c.
void fl_attach_locks | ( | void(*)(void) | lock, |
void(*)(void) | unlock | ||
) |
Definition at line 599 of file fat_filelib.c.
int fl_attach_media | ( | fn_diskio_read | rd, |
fn_diskio_write | wr | ||
) |
Definition at line 606 of file fat_filelib.c.
References CHECK_FL_INIT.
Referenced by fat_initialize(), and main().
int fl_closedir | ( | FL_DIR * | dir | ) |
Definition at line 1451 of file fat_filelib.c.
Referenced by fl_is_dir().
int fl_createdirectory | ( | const char * | path | ) |
Definition at line 1345 of file fat_filelib.c.
References CHECK_FL_INIT, and FL_LOCK.
void fl_fclose | ( | void * | f | ) |
Definition at line 856 of file fat_filelib.c.
References CHECK_FL_INIT, and FL_LOCK.
Referenced by fat_initialize(), and main().
int fl_feof | ( | void * | f | ) |
Definition at line 1125 of file fat_filelib.c.
References FL_LOCK.
int fl_fflush | ( | void * | f | ) |
Definition at line 831 of file fat_filelib.c.
References CHECK_FL_INIT, and FL_LOCK.
int fl_fgetc | ( | void * | f | ) |
Definition at line 895 of file fat_filelib.c.
References fl_fread().
Referenced by fl_fgets().
int fl_fgetpos | ( | void * | f, |
uint32 * | position | ||
) |
char* fl_fgets | ( | char * | s, |
int | n, | ||
void * | f | ||
) |
Definition at line 908 of file fat_filelib.c.
References fl_fgetc().
Definition at line 638 of file fat_filelib.c.
References CHECK_FL_INIT, and file.
Referenced by fat_initialize(), main(), and open_fat().
Definition at line 1476 of file fat_filelib.c.
References fatfs_format().
int fl_fputc | ( | int | c, |
void * | f | ||
) |
Definition at line 1147 of file fat_filelib.c.
References fl_fwrite().
int fl_fputs | ( | const char * | str, |
void * | f | ||
) |
Definition at line 1300 of file fat_filelib.c.
References fl_fwrite(), and strlen().
int fl_fread | ( | void * | buffer, |
int | size, | ||
int | length, | ||
void * | f | ||
) |
Definition at line 938 of file fat_filelib.c.
References buffer, CHECK_FL_INIT, FAT_SECTOR_SIZE, FILE_READ, and NULL.
Referenced by fl_fgetc(), and read_fat().
int fl_fseek | ( | void * | f, |
long | offset, | ||
int | origin | ||
) |
Definition at line 1034 of file fat_filelib.c.
References CHECK_FL_INIT, FL_LOCK, and SEEK_END.
Referenced by read_fat().
long fl_ftell | ( | void * | f | ) |
Definition at line 1115 of file fat_filelib.c.
References fl_fgetpos().
int fl_fwrite | ( | const void * | data, |
int | size, | ||
int | count, | ||
void * | f | ||
) |
Definition at line 1162 of file fat_filelib.c.
References buffer, CHECK_FL_INIT, and FL_LOCK.
Referenced by fat_initialize(), fl_fputc(), fl_fputs(), main(), and write_fat().
void fl_init | ( | void | ) |
Definition at line 584 of file fat_filelib.c.
Referenced by fat_init(), and main().
int fl_is_dir | ( | const char * | path | ) |
Definition at line 1460 of file fat_filelib.c.
References fl_closedir(), and fl_opendir().
void fl_listdirectory | ( | const char * | path | ) |
Definition at line 1362 of file fat_filelib.c.
References CHECK_FL_INIT, and FL_LOCK.
Referenced by main().
Definition at line 1401 of file fat_filelib.c.
References CHECK_FL_INIT, fs_dir_ent::cluster, FAT32_INVALID_CLUSTER, and FL_LOCK.
Referenced by fl_is_dir().
Definition at line 1432 of file fat_filelib.c.
References CHECK_FL_INIT, and FL_LOCK.
int fl_remove | ( | const char * | filename | ) |
Definition at line 1314 of file fat_filelib.c.
Referenced by main(), and sys_unlink().
void fl_shutdown | ( | void | ) |
Definition at line 627 of file fat_filelib.c.
References CHECK_FL_INIT, and FL_LOCK.
Referenced by main(), and sys_shutdown().