LibC/Kernel: Implement access
This commit is contained in:
@@ -83,6 +83,7 @@ __BEGIN_DECLS
|
||||
O(SYS_SETSOCKOPT, setsockopt) \
|
||||
O(SYS_REALPATH, realpath) \
|
||||
O(SYS_TTYNAME, ttyname) \
|
||||
O(SYS_ACCESS, access) \
|
||||
|
||||
enum Syscall
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user