| 1466 | } |
| 1467 | |
| 1468 | static U32 syscall_openat(CPU* cpu, U32 eipCount) { |
| 1469 | BString name = cpu->memory->readString(ARG2); |
| 1470 | SYS_LOG1(SYSCALL_FILE, cpu, "openat: dirfd=%d name=%s flags=%x", ARG1, name.c_str(), ARG3); |
| 1471 | #ifdef _DEBUG |
| 1472 | if (name == "c_rehash.sh") { |
| 1473 | // not sure why installing ca_certificats with TinyCore Linux 15 needs this |
| 1474 | klog("c_rehash.sh hack"); |
| 1475 | name = "/usr/local/sbin/c_rehash.sh"; |
| 1476 | } |
| 1477 | #endif |
| 1478 | U32 result = cpu->thread->process->openat(ARG1, name, ARG3); |
| 1479 | #ifdef _DEBUG |
| 1480 | if (result>1000 && !name.contains("font") && !name.startsWith("/sys")) { |
| 1481 | printf("openat: dirfd=%d name=%s flags=%x result=%x\n", (int)ARG1, name.c_str(), ARG3, result); |
| 1482 | } |
| 1483 | #endif |
| 1484 | SYS_LOG(SYSCALL_FILE, cpu, " result=%d(0x%X)\n", result, result); |
| 1485 | return result; |
| 1486 | } |
| 1487 | |
| 1488 | static U32 syscall_mkdirat(CPU* cpu, U32 eipCount) { |
| 1489 | BString path = cpu->memory->readString(ARG2); |
nothing calls this directly
no test coverage detected