blob: c6d62a1ddca0c5c10336c61fe48e5be6bf2c421e [file] [log] [blame]
Kevin O'Connor41639f82013-09-14 19:37:36 -04001#ifndef __ROMFILE_H
2#define __ROMFILE_H
3
4#include "types.h" // u32
5
6// romfile.c
7struct romfile_s {
8 struct romfile_s *next;
9 char name[128];
10 u32 size;
11 int (*copy)(struct romfile_s *file, void *dest, u32 maxlen);
12};
13void romfile_add(struct romfile_s *file);
14struct romfile_s *romfile_findprefix(const char *prefix, struct romfile_s *prev);
15struct romfile_s *romfile_find(const char *name);
16void *romfile_loadfile(const char *name, int *psize);
17u64 romfile_loadint(const char *name, u64 defval);
18
19#endif // romfile.h