mirror of
https://github.com/EnderIce2/Fennix.git
synced 2025-05-31 08:47:57 +00:00
userspace/libc: implement close() & dirfd()
Signed-off-by: EnderIce2 <enderice2@protonmail.com>
This commit is contained in:
parent
c2412fe710
commit
48067d8f58
@ -60,7 +60,7 @@ extern "C"
|
|||||||
|
|
||||||
int alphasort(const struct dirent **, const struct dirent **);
|
int alphasort(const struct dirent **, const struct dirent **);
|
||||||
int closedir(DIR *dirp);
|
int closedir(DIR *dirp);
|
||||||
int dirfd(DIR *);
|
int dirfd(DIR *dirp);
|
||||||
DIR *fdopendir(int);
|
DIR *fdopendir(int);
|
||||||
DIR *opendir(const char *);
|
DIR *opendir(const char *);
|
||||||
ssize_t posix_getdents(int, void *, size_t, int);
|
ssize_t posix_getdents(int, void *, size_t, int);
|
||||||
|
@ -65,7 +65,7 @@ extern "C"
|
|||||||
int chdir(const char *);
|
int chdir(const char *);
|
||||||
int chroot(const char *);
|
int chroot(const char *);
|
||||||
int chown(const char *, uid_t, gid_t);
|
int chown(const char *, uid_t, gid_t);
|
||||||
int close(int);
|
int close(int fildes);
|
||||||
size_t confstr(int, char *, size_t);
|
size_t confstr(int, char *, size_t);
|
||||||
char *crypt(const char *, const char *);
|
char *crypt(const char *, const char *);
|
||||||
char *ctermid(char *);
|
char *ctermid(char *);
|
||||||
|
@ -45,7 +45,12 @@ export int closedir(DIR *dirp)
|
|||||||
return 0;
|
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 *fdopendir(int);
|
||||||
export DIR *opendir(const char *);
|
export DIR *opendir(const char *);
|
||||||
export ssize_t posix_getdents(int, void *, size_t, int);
|
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 chdir(const char *);
|
||||||
export int chroot(const char *);
|
export int chroot(const char *);
|
||||||
export int chown(const char *, uid_t, gid_t);
|
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 size_t confstr(int, char *, size_t);
|
||||||
export char *crypt(const char *, const char *);
|
export char *crypt(const char *, const char *);
|
||||||
export char *ctermid(char *);
|
export char *ctermid(char *);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user