MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / syscall_open

Function syscall_open

source/kernel/syscall.cpp:114–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112}
113
114static U32 syscall_open(CPU* cpu, U32 eipCount) {
115 BString name = cpu->memory->readString(ARG1);
116 SYS_LOG1(SYSCALL_FILE, cpu, "open: name=%s flags=%x", name.c_str(), ARG2);
117 U32 result = cpu->thread->process->open(name, ARG2);
118#ifdef _DEBUG
119 if (result>1000) {
120 printf("open: name=%s flags=%x result=%X\n", name.c_str(), ARG2, result);
121 }
122#endif
123 SYS_LOG(SYSCALL_FILE, cpu, " result=%d(0x%X)\n", result, result);
124 return result;
125}
126
127static U32 syscall_close(CPU* cpu, U32 eipCount) {
128 SYS_LOG1(SYSCALL_FILE, cpu, "close: fd=%d", ARG1);

Callers

nothing calls this directly

Calls 3

openMethod · 0.65
readStringMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected