Loading include/client/hooks.hpp +1 −1 Original line number Diff line number Diff line Loading @@ -100,7 +100,7 @@ hook_read(unsigned int fd, void* buf, size_t count); ssize_t hook_pread(unsigned int fd, char* buf, size_t count, loff_t pos); int ssize_t hook_readv(unsigned long fd, const struct iovec* iov, unsigned long iovcnt); ssize_t Loading src/client/hooks.cpp +7 −7 Original line number Diff line number Diff line Loading @@ -36,22 +36,24 @@ #include <client/open_dir.hpp> #include <common/path_util.hpp> #include <gsl/gsl> #include <string> #include <gsl/util> #include <memory> extern "C" { #include <fcntl.h> #include <sys/stat.h> #include <sys/statfs.h> #include <sys/syscall.h> } namespace { // TODO replace all internal gkfs errno variable usage with LEAF inline int with_errno(int ret) { template <typename T> inline T with_errno(T ret) { return (ret < 0) ? -errno : ret; } Loading Loading @@ -149,8 +151,6 @@ hook_statx(int dirfd, const char* path, int flags, unsigned int mask, LOG(ERROR, "{}() relativize status unknown: {}", __func__); return -EINVAL; } return syscall_no_intercept(SYS_statx, dirfd, path, flags, mask, buf); } #endif Loading Loading @@ -247,7 +247,7 @@ hook_pread(unsigned int fd, char* buf, size_t count, loff_t pos) { return syscall_no_intercept_wrapper(SYS_pread64, fd, buf, count, pos); } int ssize_t hook_readv(unsigned long fd, const struct iovec* iov, unsigned long iovcnt) { LOG(DEBUG, "{}() called with fd: {}, iov: {}, iovcnt: {}", __func__, fd, Loading Loading
include/client/hooks.hpp +1 −1 Original line number Diff line number Diff line Loading @@ -100,7 +100,7 @@ hook_read(unsigned int fd, void* buf, size_t count); ssize_t hook_pread(unsigned int fd, char* buf, size_t count, loff_t pos); int ssize_t hook_readv(unsigned long fd, const struct iovec* iov, unsigned long iovcnt); ssize_t Loading
src/client/hooks.cpp +7 −7 Original line number Diff line number Diff line Loading @@ -36,22 +36,24 @@ #include <client/open_dir.hpp> #include <common/path_util.hpp> #include <gsl/gsl> #include <string> #include <gsl/util> #include <memory> extern "C" { #include <fcntl.h> #include <sys/stat.h> #include <sys/statfs.h> #include <sys/syscall.h> } namespace { // TODO replace all internal gkfs errno variable usage with LEAF inline int with_errno(int ret) { template <typename T> inline T with_errno(T ret) { return (ret < 0) ? -errno : ret; } Loading Loading @@ -149,8 +151,6 @@ hook_statx(int dirfd, const char* path, int flags, unsigned int mask, LOG(ERROR, "{}() relativize status unknown: {}", __func__); return -EINVAL; } return syscall_no_intercept(SYS_statx, dirfd, path, flags, mask, buf); } #endif Loading Loading @@ -247,7 +247,7 @@ hook_pread(unsigned int fd, char* buf, size_t count, loff_t pos) { return syscall_no_intercept_wrapper(SYS_pread64, fd, buf, count, pos); } int ssize_t hook_readv(unsigned long fd, const struct iovec* iov, unsigned long iovcnt) { LOG(DEBUG, "{}() called with fd: {}, iov: {}, iovcnt: {}", __func__, fd, Loading