MCPcopy Create free account
hub / github.com/devkitPro/libctru / FSUSER_OpenArchive

Function FSUSER_OpenArchive

libctru/source/services/fs.c:381–400  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

379}
380
381Result FSUSER_OpenArchive(FS_Archive* archive, FS_ArchiveID id, FS_Path path)
382{
383 if(!archive) return -2;
384
385 u32 *cmdbuf = getThreadCommandBuffer();
386
387 cmdbuf[0] = IPC_MakeHeader(0x80C,3,2); // 0x80C00C2
388 cmdbuf[1] = id;
389 cmdbuf[2] = path.type;
390 cmdbuf[3] = path.size;
391 cmdbuf[4] = IPC_Desc_StaticBuffer(path.size, 0);
392 cmdbuf[5] = (u32) path.data;
393
394 Result ret = 0;
395 if(R_FAILED(ret = svcSendSyncRequest(fsSession()))) return ret;
396
397 *archive = cmdbuf[2] | ((u64) cmdbuf[3] << 32);
398
399 return cmdbuf[1];
400}
401
402Result FSUSER_ControlArchive(FS_Archive archive, FS_ArchiveAction action, void* input, u32 inputSize, void* output, u32 outputSize)
403{

Callers 2

archiveMountFunction · 0.85
archiveMountSdmcFunction · 0.85

Calls 4

getThreadCommandBufferFunction · 0.85
IPC_MakeHeaderFunction · 0.85
IPC_Desc_StaticBufferFunction · 0.85
fsSessionFunction · 0.85

Tested by

no test coverage detected