11 static byte *FWDATBin = NULL;
21 if(lstat(AbsPath, &statbuf))
24 if(lstat(AbsPath, &statbuf))
31 if((fp = fopen(AbsPath,
"r")) == NULL)
37 if((FWDATBin = TAP_MemAlloc(statbuf.st_size)) == NULL)
45 blk = fread(FWDATBin, statbuf.st_size, 1, fp);
54 FWDAT->
Magic != 0x12345678 ||
58 TAP_MemFree(FWDATBin);
65 if(FWDatHeader) *FWDatHeader = FWDAT;
66 if(ToppyInfo) *ToppyInfo = (
tToppyInfo *) (FWDAT + 1);
struct __STDIO_FILE_STRUCT FILE
bool LoadFirmwareDat(tFWDATHeader **FWDatHeader, tToppyInfo **ToppyInfo, tFWInfo **FWInfo)