feat: vfs - add stat syscall

This commit is contained in:
2026-07-21 14:23:06 +02:00
parent 5c02c5fe79
commit de7edaf623
12 changed files with 110 additions and 1 deletions
+4
View File
@@ -153,6 +153,10 @@ namespace montauk::abi {
case SYS_GETEXECPATH:
if (!UserMemory::Range(frame->arg2 ? frame->arg1 : frame->arg1, frame->arg2, true)) return -1;
return Sys_GetExecPath((char*)frame->arg1, frame->arg2);
case SYS_STAT:
if (!UserMemory::String(frame->arg1, kMaxPathBytes)) return -1;
if (!UserMemory::Writable<FileStat>(frame->arg2)) return -1;
return (int64_t)Sys_Stat((const char*)frame->arg1, (FileStat*)frame->arg2);
case SYS_TERMSIZE:
return (int64_t)Sys_TermSize();
case SYS_GETARGS: