From c5ab2adbf0c14a6d0d4e2245a616d01de4b88214 Mon Sep 17 00:00:00 2001 From: inmarket Date: Fri, 24 Jan 2014 19:33:28 +1000 Subject: More code for GFile --- src/gfile/inc_romfs.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'src/gfile/inc_romfs.c') diff --git a/src/gfile/inc_romfs.c b/src/gfile/inc_romfs.c index 321dc9b1..170b9a6c 100644 --- a/src/gfile/inc_romfs.c +++ b/src/gfile/inc_romfs.c @@ -39,8 +39,8 @@ static bool_t ROMEof(GFILE *f); static const GFILEVMT FsROMVMT = { GFILE_CHAINHEAD, // next - 'S', // prefix GFSFLG_CASESENSITIVE|GFSFLG_SEEKABLE|GFSFLG_FAST, // flags + 'S', // prefix 0, ROMExists, ROMFilesize, 0, ROMOpen, ROMClose, ROMRead, 0, ROMSetpos, ROMGetsize, ROMEof, @@ -64,20 +64,10 @@ static long int ROMFilesize(const char *fname) { if (!(p = ROMFindFile(fname))) return -1; return p->size; } -static bool_t ROMOpen(GFILE *f, const char *fname, const char *mode) { +static bool_t ROMOpen(GFILE *f, const char *fname) { const ROMFS_DIRENTRY *p; - // Check mode - if (mode[0] != 'r') return FALSE; - while(*++mode) { - switch(*mode) { - case '+': case 'w': case 'a': - return FALSE; - } - } - if (!(p = ROMFindFile(fname))) return FALSE; - f->vmt = &FsROMVMT; f->obj = (void *)p; return TRUE; } -- cgit v1.2.3