MCPcopy Create free account
hub / github.com/doldecomp/mkdd / write

Function write

src/Osako/CardMgr.cpp:225–247  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

223 }
224
225 bool write(s32 chan, SaveFile::FilePart filePart)
226 {
227 SaveFile *pSaveFile = msaCardData[chan].mSaveFile;
228
229 pSaveFile->setPart(filePart);
230 pSaveFile->fetch();
231 pSaveFile->setCheckData(OSGetTime());
232
233 // clang-format off
234#line 303
235 JUT_ASSERT(pSaveFile->getBuf());
236 JUT_ASSERT(!( pSaveFile->getLength() & ( msaCardData[ chan ].mSectorSize - 1 ) ));
237 JUT_ASSERT(!( pSaveFile->getOffset() & ( msaCardData[ chan ].mSectorSize - 1 ) ));
238 // clang-format on
239
240 if (msaCardData[chan].mTaskStatus == mcNoTask)
241 {
242 msaCardData[chan].mTaskStatus = mcTaskRequested;
243 return SYSTEM_RequestTask(writeTask, (void *)chan, nullptr);
244 }
245
246 return false;
247 }
248
249 void writeTask(void *arg)
250 {

Callers 2

waitCreateFunction · 0.85
waitReadFunction · 0.85

Calls 7

OSGetTimeFunction · 0.85
setPartMethod · 0.45
fetchMethod · 0.45
setCheckDataMethod · 0.45
getBufMethod · 0.45
getLengthMethod · 0.45
getOffsetMethod · 0.45

Tested by

no test coverage detected