feat(userspace/libc): implement brk(), chdir() and getcwd()

Signed-off-by: EnderIce2 <enderice2@protonmail.com>
This commit is contained in:
2025-03-21 02:01:57 +00:00
parent 36bb7b7a88
commit 7087ce7ec5
5 changed files with 53 additions and 9 deletions

View File

@ -189,3 +189,23 @@ int sysdep(ProcessControl)(unsigned long Option, unsigned long Arg1, unsigned lo
{
return call_prctl(Option, Arg1, Arg2, Arg3, Arg4);
}
int sysdep(ChangeDirectory)(const char *Pathname)
{
return call_chdir(Pathname);
}
char *sysdep(GetWorkingDirectory)(char *Buffer, size_t Size)
{
return (char *)call_getcwd(Buffer, Size);
}
int sysdep(Brk)(void *Address)
{
return call_brk(Address);
}
int sysdep(FileControl)(int Descriptor, int Command, void *Arg)
{
return call_fcntl(Descriptor, Command, Arg);
}