LibC/Kernel: Implement access

This commit is contained in:
2024-07-30 11:51:07 +03:00
parent e5bb843059
commit f0be4f86a6
4 changed files with 33 additions and 0 deletions

View File

@@ -83,6 +83,7 @@ __BEGIN_DECLS
O(SYS_SETSOCKOPT, setsockopt) \
O(SYS_REALPATH, realpath) \
O(SYS_TTYNAME, ttyname) \
O(SYS_ACCESS, access) \
enum Syscall
{

View File

@@ -496,3 +496,8 @@ char* ttyname(int fildes)
return nullptr;
return storage;
}
int access(const char* path, int amode)
{
return syscall(SYS_ACCESS, path, amode);
}