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

Function syscall_llseek

source/kernel/syscall.cpp:748–760  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

746}
747
748static U32 syscall_llseek(CPU* cpu, U32 eipCount) {
749 SYS_LOG1(SYSCALL_FILE, cpu, "llseek: fildes=%d offset=%.8X%.8X pResult=%X whence=%d", ARG1, ARG2, ARG3, ARG4, ARG5);
750 S64 r64 = cpu->thread->process->llseek(ARG1, ((U64)ARG2)<<32|ARG3, ARG5);
751 if (ARG4 && r64>=0) {
752 cpu->memory->writeq(ARG4, r64);
753 }
754 U32 result = 0;
755 if (r64<0) {
756 result = (U32)r64;
757 }
758 SYS_LOG(SYSCALL_FILE, cpu, " result=%d(0x%X)\n", result, result);
759 return result;
760}
761
762static U32 syscall_getdents(CPU* cpu, U32 eipCount) {
763 SYS_LOG1(SYSCALL_FILE, cpu, "getdents: fd=%d dir=%X count=%d", ARG1, ARG2, ARG3);

Callers

nothing calls this directly

Calls 2

llseekMethod · 0.80
writeqMethod · 0.80

Tested by

no test coverage detected