#include <core/DspRomFs.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <file.h>
#include <errno.h>
Classes | |
struct | tsRomFsFile |
Defines | |
#define | MAX_FILENO 21 |
hardcoded max 21 FDS. TODO - make dynamic... | |
#define | ROMFS_OPEN_DEF(X, Y) |
#define | ROMFS_RENAME_DEF(X, Y) |
#define | ROMFS_UNLINK_DEF(X, Y) |
Typedefs | |
typedef int(* | romfs_open )(const char *, unsigned int, int) |
The following compiler gymnastics is due to the fact that the TI file system hooks strip the device name off of the path prior to calling the specified function, so there is no way the support multiple ROMFS devices using the same functions unless you slip in an argument telling the real functions what device they are using. | |
typedef int(* | romfs_rename )(const char *, const char *) |
typedef int(* | romfs_unlink )(const char *) |
typedef int(* | c_romfs_open )(const char *, unsigned int, int) |
typedef int(* | c_romfs_rename )(const char *, const char *) |
typedef int(* | c_romfs_unlink )(const char *) |
typedef int(* | c_romfs_close )(int) |
typedef int(* | c_romfs_read )(int, char *, unsigned int) |
typedef int(* | c_romfs_write )(int, const char *, unsigned int) |
typedef off_t(* | c_romfs_lseek )(int, off_t, int) |
Variables | |
static tsRomFsFile | gaRomFsFiles [MAX_FILENO] |
tcDspRomFs * | gpROMFSDevData [tcDspRomFs::gnMaxRomFileSystems] |
romfs_open | ROMFS_OPEN_ARRAY [tcDspRomFs::gnMaxRomFileSystems] |
romfs_rename | ROMFS_RENAME_ARRAY [tcDspRomFs::gnMaxRomFileSystems] |
romfs_unlink | ROMFS_UNLINK_ARRAY [tcDspRomFs::gnMaxRomFileSystems] |
#define MAX_FILENO 21 |
hardcoded max 21 FDS. TODO - make dynamic...
#define ROMFS_OPEN_DEF | ( | X, | |||
Y | ) |
int X(const char *path, unsigned int flags, int fno) \ { \ return(gpROMFSDevData[Y]->open(path, flags, fno)); \ }
#define ROMFS_RENAME_DEF | ( | X, | |||
Y | ) |
int X(const char *old_name, const char *new_name) \ { \ return(gpROMFSDevData[Y]->rename(old_name, new_name)); \ }
#define ROMFS_UNLINK_DEF | ( | X, | |||
Y | ) |
int X(const char* name) \ { \ return(gpROMFSDevData[Y]->unlink(name)); \ }
typedef int(* romfs_open)(const char *, unsigned int, int) |
The following compiler gymnastics is due to the fact that the TI file system hooks strip the device name off of the path prior to calling the specified function, so there is no way the support multiple ROMFS devices using the same functions unless you slip in an argument telling the real functions what device they are using.
..
typedef int(* romfs_rename)(const char *, const char *) |
typedef int(* romfs_unlink)(const char *) |
typedef int(* c_romfs_open)(const char *, unsigned int, int) |
typedef int(* c_romfs_rename)(const char *, const char *) |
typedef int(* c_romfs_unlink)(const char *) |
typedef int(* c_romfs_close)(int) |
typedef int(* c_romfs_read)(int, char *, unsigned int) |
typedef int(* c_romfs_write)(int, const char *, unsigned int) |
typedef off_t(* c_romfs_lseek)(int, off_t, int) |
tsRomFsFile gaRomFsFiles[MAX_FILENO] [static] |
tcDspRomFs* gpROMFSDevData[tcDspRomFs::gnMaxRomFileSystems] |
{ NULL, NULL, NULL, NULL, NULL }
romfs_open ROMFS_OPEN_ARRAY[tcDspRomFs::gnMaxRomFileSystems] |
{ tcDspRomFs::ROMFS_open_0, tcDspRomFs::ROMFS_open_1, tcDspRomFs::ROMFS_open_2, tcDspRomFs::ROMFS_open_3, tcDspRomFs::ROMFS_open_4, }
romfs_rename ROMFS_RENAME_ARRAY[tcDspRomFs::gnMaxRomFileSystems] |
{ tcDspRomFs::ROMFS_rename_0, tcDspRomFs::ROMFS_rename_1, tcDspRomFs::ROMFS_rename_2, tcDspRomFs::ROMFS_rename_3, tcDspRomFs::ROMFS_rename_4, }
romfs_unlink ROMFS_UNLINK_ARRAY[tcDspRomFs::gnMaxRomFileSystems] |
{ tcDspRomFs::ROMFS_unlink_0, tcDspRomFs::ROMFS_unlink_1, tcDspRomFs::ROMFS_unlink_2, tcDspRomFs::ROMFS_unlink_3, tcDspRomFs::ROMFS_unlink_4, }