Add an interface for sys operations

Create a mock sys interface to test file operations.

Change-Id: Iad23394c600d66ee5de8e21db4702f38492c3058
Signed-off-by: Kun Yi <kunyi@google.com>
diff --git a/sys.cpp b/sys.cpp
new file mode 100644
index 0000000..0a16dcb
--- /dev/null
+++ b/sys.cpp
@@ -0,0 +1,41 @@
+#include "sys.hpp"
+
+#include <fcntl.h>
+#include <unistd.h>
+
+namespace binstore
+{
+
+namespace internal
+{
+
+int SysImpl::open(const char* pathname, int flags) const
+{
+    return ::open(pathname, flags);
+}
+
+int SysImpl::close(int fd) const
+{
+    return ::close(fd);
+}
+
+off_t SysImpl::lseek(int fd, off_t offset, int whence) const
+{
+    return ::lseek(fd, offset, whence);
+}
+
+ssize_t SysImpl::read(int fd, void* buf, size_t count) const
+{
+    return ::read(fd, buf, count);
+}
+
+ssize_t SysImpl::write(int fd, const void* buf, size_t count) const
+{
+    return ::write(fd, buf, count);
+}
+
+SysImpl sys_impl;
+
+} // namespace internal
+
+} // namespace binstore