| 112 | } |
| 113 | |
| 114 | static 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 | |
| 127 | static U32 syscall_close(CPU* cpu, U32 eipCount) { |
| 128 | SYS_LOG1(SYSCALL_FILE, cpu, "close: fd=%d", ARG1); |
nothing calls this directly
no test coverage detected