LibC: add read() and write() to unistd

This commit is contained in:
Bananymous 2023-07-06 22:15:55 +03:00
parent af30d537da
commit 22caacd2a9
1 changed files with 10 additions and 0 deletions

View File

@ -273,6 +273,16 @@ int close(int fd)
return syscall(SYS_CLOSE, fd); return syscall(SYS_CLOSE, fd);
} }
ssize_t read(int fildes, void* buf, size_t nbyte)
{
return syscall(SYS_READ, fildes, buf, nbyte);
}
ssize_t write(int fildes, const void* buf, size_t nbyte)
{
return syscall(SYS_WRITE, fildes, buf, nbyte);
}
int execl(const char* pathname, const char* arg0, ...) int execl(const char* pathname, const char* arg0, ...)
{ {
if (arg0 == nullptr) if (arg0 == nullptr)