MCPcopy Create free account
hub / github.com/DacoTaco/priiloader / WriteFile

Function WriteFile

tools/bootloader/source/bootloader.cpp:53–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51const unsigned int baseAddress = 0x80004000;
52
53int WriteFile(FileInfo* info)
54{
55 if (info == NULL)
56 return -1;
57
58 FILE* file;
59 file = fopen(info->Filename.c_str(), "wb+");
60 if (!file)
61 return -2;
62
63 fwrite(info->Data, 1, info->FileSize, file);
64 fclose(file);
65 return 1;
66}
67
68int ReadFile(FileInfo* info)
69{

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected