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

Function FSUSER_Control

libctru/source/services/fs.c:131–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131Result FSUSER_Control(FS_Action action, void* input, u32 inputSize, void* output, u32 outputSize)
132{
133 u32 *cmdbuf = getThreadCommandBuffer();
134
135 cmdbuf[0] = IPC_MakeHeader(0x401,3,4); // 0x40100C4
136 cmdbuf[1] = action;
137 cmdbuf[2] = inputSize;
138 cmdbuf[3] = outputSize;
139 cmdbuf[4] = IPC_Desc_Buffer(inputSize, IPC_BUFFER_R);
140 cmdbuf[5] = (u32) input;
141 cmdbuf[6] = IPC_Desc_Buffer(outputSize, IPC_BUFFER_W);
142 cmdbuf[7] = (u32) output;
143
144 Result ret = 0;
145 if(R_FAILED(ret = svcSendSyncRequest(fsSession()))) return ret;
146
147 return cmdbuf[1];
148}
149
150Result FSUSER_Initialize(Handle session)
151{

Callers

nothing calls this directly

Calls 4

getThreadCommandBufferFunction · 0.85
IPC_MakeHeaderFunction · 0.85
IPC_Desc_BufferFunction · 0.85
fsSessionFunction · 0.85

Tested by

no test coverage detected