mirror of
https://github.com/EnderIce2/Fennix.git
synced 2025-05-28 15:34:31 +00:00
feat(userspace/libc): implement access()
Signed-off-by: EnderIce2 <enderice2@protonmail.com>
This commit is contained in:
parent
dd1ffe0d17
commit
e89e984ccb
@ -59,7 +59,7 @@ extern "C"
|
|||||||
extern int optind, opterr, optopt;
|
extern int optind, opterr, optopt;
|
||||||
extern char **environ;
|
extern char **environ;
|
||||||
|
|
||||||
int access(const char *, int);
|
int access(const char *path, int amode);
|
||||||
unsigned int alarm(unsigned int seconds);
|
unsigned int alarm(unsigned int seconds);
|
||||||
int brk(void *);
|
int brk(void *);
|
||||||
int chdir(const char *);
|
int chdir(const char *);
|
||||||
|
@ -29,7 +29,10 @@ export char *optarg;
|
|||||||
export int optind, opterr, optopt;
|
export int optind, opterr, optopt;
|
||||||
export char **environ;
|
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)
|
export unsigned int alarm(unsigned int seconds)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user