Loading src/client/gkfs_functions.cpp +7 −2 Original line number Diff line number Diff line Loading @@ -75,9 +75,15 @@ using namespace std; * kernel: fs/readdir.c. */ struct linux_dirent { #ifndef __USE_FILE_OFFSET64 unsigned long d_ino; unsigned long d_off; #else uint64_t d_ino; int64_t d_off; #endif unsigned short d_reclen; unsigned char d_type; // Does it break dirents? char d_name[1]; }; /* Loading Loading @@ -149,7 +155,6 @@ namespace gkfs::syscall { */ int gkfs_open(const std::string& path, mode_t mode, int flags) { // metadata object filled during create or stat gkfs::metadata::Metadata md{}; if(flags & O_CREAT) { Loading Loading @@ -1499,7 +1504,7 @@ gkfs_getdents(unsigned int fd, struct linux_dirent* dirp, unsigned int count) { current_dirp->d_reclen = total_size; *(reinterpret_cast<char*>(current_dirp) + total_size - 1) = current_dirp->d_type = ((de.type() == gkfs::filemap::FileType::regular) ? DT_REG : DT_DIR); Loading Loading
src/client/gkfs_functions.cpp +7 −2 Original line number Diff line number Diff line Loading @@ -75,9 +75,15 @@ using namespace std; * kernel: fs/readdir.c. */ struct linux_dirent { #ifndef __USE_FILE_OFFSET64 unsigned long d_ino; unsigned long d_off; #else uint64_t d_ino; int64_t d_off; #endif unsigned short d_reclen; unsigned char d_type; // Does it break dirents? char d_name[1]; }; /* Loading Loading @@ -149,7 +155,6 @@ namespace gkfs::syscall { */ int gkfs_open(const std::string& path, mode_t mode, int flags) { // metadata object filled during create or stat gkfs::metadata::Metadata md{}; if(flags & O_CREAT) { Loading Loading @@ -1499,7 +1504,7 @@ gkfs_getdents(unsigned int fd, struct linux_dirent* dirp, unsigned int count) { current_dirp->d_reclen = total_size; *(reinterpret_cast<char*>(current_dirp) + total_size - 1) = current_dirp->d_type = ((de.type() == gkfs::filemap::FileType::regular) ? DT_REG : DT_DIR); Loading