internal: add read() method
Add the read() method to the internal syscall interface.
Change-Id: Iea2a137df5b6ba2085c7363ca150d4e4b8864048
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/internal/sys.cpp b/internal/sys.cpp
index b99a2f2..46c6642 100644
--- a/internal/sys.cpp
+++ b/internal/sys.cpp
@@ -29,6 +29,11 @@
return ::open(pathname, flags);
}
+int SysImpl::read(int fd, void* buf, std::size_t count) const
+{
+ return static_cast<int>(::read(fd, buf, count));
+}
+
int SysImpl::close(int fd) const
{
return ::close(fd);