feat(userspace/libc): implement access()

Signed-off-by: EnderIce2 <enderice2@protonmail.com>
This commit is contained in:
EnderIce2 2025-03-21 01:17:21 +00:00
parent dd1ffe0d17
commit e89e984ccb
No known key found for this signature in database
GPG Key ID: 2EE20AF089811A5A
2 changed files with 5 additions and 2 deletions

View File

@ -59,7 +59,7 @@ extern "C"
extern int optind, opterr, optopt;
extern char **environ;
int access(const char *, int);
int access(const char *path, int amode);
unsigned int alarm(unsigned int seconds);
int brk(void *);
int chdir(const char *);

View File

@ -29,7 +29,10 @@ export char *optarg;
export int optind, opterr, optopt;
export char **environ;
export int access(const char *, int);
export int access(const char *path, int amode)
{
return __check_errno(sysdep(Access)(path, amode), -1);
}
export unsigned int alarm(unsigned int seconds)
{