| // Copyright 2024 Google LLC | |
| // | |
| // Licensed under the Apache License, Version 2.0 (the "License"); | |
| // you may not use this file except in compliance with the License. | |
| // You may obtain a copy of the License at | |
| // | |
| // http://www.apache.org/licenses/LICENSE-2.0 | |
| // | |
| // Unless required by applicable law or agreed to in writing, software | |
| // distributed under the License is distributed on an "AS IS" BASIS, | |
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| // See the License for the specific language governing permissions and | |
| // limitations under the License. | |
| #include "sys.hpp" | |
| #include <fcntl.h> | |
| #include <mtd/mtd-user.h> | |
| #include <sys/ioctl.h> | |
| #include <unistd.h> | |
| #include <cstdint> | |
| namespace google | |
| { | |
| namespace hoth | |
| { | |
| 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); | |
| } | |
| int SysImpl::ioctl(int fd, uint64_t request, void* mtd) const | |
| { | |
| return ::ioctl(fd, request, mtd); | |
| } | |
| SysImpl sys_impl; | |
| } // namespace internal | |
| } // namespace hoth | |
| } // namespace google |