1 #ifndef _FILE_OVR_H
2 #define _FILE_OVR_H
3 /**
4 * @file file_ovr.h
5 *
6 * @brief
7 * Overrides the standard file operations (fseek, fread, ftell, fclose).
8 * This file must be included after the standard elf includes
9 */
10 #include <limits.h>
13 /* Redirect seek and reads */
14 #define fseek(x,y,z) (*x->seek)((Int32)(y),(Int32)(z))
15 #define fread(w,x,y,z) (((*z->read)((Uint8 *)(w),(Uint32)((x)*(y)))) == 0 ? (y) : 0)
16 #define ftell(x) UINT_MAX
17 #define fclose(x) 0
20 #define FILE BOOT_MODULE_FXN_TABLE
22 #endif /* _FILE_OVR_H */