MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / __CARDGetStatusEx

Function __CARDGetStatusEx

src/dolphin/src/card/CARDStatEx.c:5–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3#include <dolphin/CARDPriv.h>
4
5s32 __CARDGetStatusEx(s32 chan, s32 fileNo, CARDDir* dirent)
6{
7 if ((fileNo < 0) || (fileNo >= CARD_MAX_FILE))
8 {
9 return CARD_RESULT_FATAL_ERROR;
10 }
11
12 {
13 CARDControl* card;
14 CARDDir* dir;
15 CARDDir* ent;
16 s32 result = __CARDGetControlBlock(chan, &card);
17
18 if (result < 0)
19 {
20 return result;
21 }
22
23 dir = __CARDGetDirBlock(card);
24 ent = &dir[fileNo];
25 result = __CARDIsReadable(card, ent);
26 if (result >= 0)
27 {
28 memcpy(dirent, ent, 0x40);
29 }
30 return __CARDPutControlBlock(card, result);
31 }
32}
33
34s32 __CARDSetStatusExAsync(s32 chan, s32 fileNo, CARDDir* dirent, CARDCallback callback)
35{

Callers 1

CARDSetAttributesAsyncFunction · 0.85

Calls 5

__CARDGetControlBlockFunction · 0.85
__CARDGetDirBlockFunction · 0.85
__CARDIsReadableFunction · 0.85
memcpyFunction · 0.85
__CARDPutControlBlockFunction · 0.85

Tested by

no test coverage detected