mirror of
https://github.com/EnderIce2/Fennix.git
synced 2025-07-06 04:49:16 +00:00
userspace/libc: implement close() & dirfd()
Signed-off-by: EnderIce2 <enderice2@protonmail.com>
This commit is contained in:
@ -45,7 +45,12 @@ export int closedir(DIR *dirp)
|
||||
return 0;
|
||||
}
|
||||
|
||||
export int dirfd(DIR *);
|
||||
export int dirfd(DIR *dirp)
|
||||
{
|
||||
printf("dirfd() is unimplemented\n");
|
||||
return __check_errno(-ENOSYS, -1);
|
||||
}
|
||||
|
||||
export DIR *fdopendir(int);
|
||||
export DIR *opendir(const char *);
|
||||
export ssize_t posix_getdents(int, void *, size_t, int);
|
||||
|
@ -40,7 +40,12 @@ export int brk(void *);
|
||||
export int chdir(const char *);
|
||||
export int chroot(const char *);
|
||||
export int chown(const char *, uid_t, gid_t);
|
||||
export int close(int);
|
||||
|
||||
export int close(int fildes)
|
||||
{
|
||||
return __check_errno(call_close(fildes), -1);
|
||||
}
|
||||
|
||||
export size_t confstr(int, char *, size_t);
|
||||
export char *crypt(const char *, const char *);
|
||||
export char *ctermid(char *);
|
||||
|
Reference in New Issue
Block a user