summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibC/sys/uio.cpp
diff options
context:
space:
mode:
authorAnotherTest <ali.mpfard@gmail.com>2021-02-12 05:40:03 +0330
committerAndreas Kling <kling@serenityos.org>2021-02-15 17:32:56 +0100
commita3a7ab83c472b9cd3a0b119d4b27104525d1d2f1 (patch)
tree498c5784fec26d859dbbe84b452c385f22d5336a /Userland/Libraries/LibC/sys/uio.cpp
parent1e79c0461612807eeb0783665fba4e409c56462e (diff)
downloadserenity-a3a7ab83c472b9cd3a0b119d4b27104525d1d2f1.zip
Kernel+LibC: Implement readv
We already had writev, so let's just add readv too.
Diffstat (limited to 'Userland/Libraries/LibC/sys/uio.cpp')
-rw-r--r--Userland/Libraries/LibC/sys/uio.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/Userland/Libraries/LibC/sys/uio.cpp b/Userland/Libraries/LibC/sys/uio.cpp
index 2fd6c94fe9..58b03a690f 100644
--- a/Userland/Libraries/LibC/sys/uio.cpp
+++ b/Userland/Libraries/LibC/sys/uio.cpp
@@ -35,4 +35,10 @@ ssize_t writev(int fd, const struct iovec* iov, int iov_count)
int rc = syscall(SC_writev, fd, iov, iov_count);
__RETURN_WITH_ERRNO(rc, rc, -1);
}
+
+ssize_t readv(int fd, const struct iovec* iov, int iov_count)
+{
+ int rc = syscall(SC_readv, fd, iov, iov_count);
+ __RETURN_WITH_ERRNO(rc, rc, -1);
+}
}