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

Function syscall_openat

source/kernel/syscall.cpp:1468–1486  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1466}
1467
1468static 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
1488static U32 syscall_mkdirat(CPU* cpu, U32 eipCount) {
1489 BString path = cpu->memory->readString(ARG2);

Callers

nothing calls this directly

Calls 6

klogFunction · 0.85
openatMethod · 0.80
startsWithMethod · 0.80
readStringMethod · 0.45
c_strMethod · 0.45
containsMethod · 0.45

Tested by

no test coverage detected