Loading ifs/include/preload/open_dir.hpp +3 −3 Original line number Diff line number Diff line Loading @@ -16,9 +16,9 @@ class OpenDir: public OpenFile { class DirEntry { public: std::string name; file_type type; FileType type; DirEntry(const std::string& name, const file_type type); DirEntry(const std::string& name, const FileType type); }; std::vector<DirEntry> entries; Loading @@ -30,7 +30,7 @@ class OpenDir: public OpenFile { public: OpenDir(const std::string& path); void add(const std::string& name, const file_type& type); void add(const std::string& name, const FileType& type); struct dirent * readdir(); }; Loading ifs/include/preload/open_file_map.hpp +1 −1 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ enum class OpenFile_flags { flag_count // this is purely used as a size variable of this enum class }; enum file_type { enum class FileType { regular, directory }; Loading ifs/src/preload/open_dir.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ #include <cassert> OpenDir::DirEntry::DirEntry(const std::string& name, const file_type type): OpenDir::DirEntry::DirEntry(const std::string& name, const FileType type): name(name), type(type) { } Loading @@ -15,7 +15,7 @@ OpenDir::OpenDir(const std::string& path): OpenFile(path, 0){ } void OpenDir::add(const std::string& name, const file_type& type){ void OpenDir::add(const std::string& name, const FileType& type){ entries.push_back(DirEntry(name, type)); } Loading @@ -24,7 +24,7 @@ void OpenDir::update_dirent(unsigned int pos){ std::string entry_absolute_path = path_ + "/" + entry.name; dirent_.d_ino = std::hash<std::string>()(entry_absolute_path); dirent_.d_off = pos_; dirent_.d_type = ((entry.type == regular)? DT_REG : DT_DIR); dirent_.d_type = ((entry.type == FileType::regular)? DT_REG : DT_DIR); assert(sizeof(dirent_.d_name) >= strlen(entry.name.c_str())); strcpy(dirent_.d_name, entry.name.c_str()); dirent_.d_reclen = sizeof(dirent_); Loading ifs/src/preload/rpc/ld_rpc_metadentry.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -479,7 +479,7 @@ void rpc_send_get_dirents(OpenDir& open_dir){ for(unsigned int i = 0; i < out.dirents_size; i++){ file_type ftype = (*bool_ptr)? directory : regular; FileType ftype = (*bool_ptr)? FileType::directory : FileType::regular; bool_ptr++; //Check that we are not outside the recv_buff for this specific host Loading Loading
ifs/include/preload/open_dir.hpp +3 −3 Original line number Diff line number Diff line Loading @@ -16,9 +16,9 @@ class OpenDir: public OpenFile { class DirEntry { public: std::string name; file_type type; FileType type; DirEntry(const std::string& name, const file_type type); DirEntry(const std::string& name, const FileType type); }; std::vector<DirEntry> entries; Loading @@ -30,7 +30,7 @@ class OpenDir: public OpenFile { public: OpenDir(const std::string& path); void add(const std::string& name, const file_type& type); void add(const std::string& name, const FileType& type); struct dirent * readdir(); }; Loading
ifs/include/preload/open_file_map.hpp +1 −1 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ enum class OpenFile_flags { flag_count // this is purely used as a size variable of this enum class }; enum file_type { enum class FileType { regular, directory }; Loading
ifs/src/preload/open_dir.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ #include <cassert> OpenDir::DirEntry::DirEntry(const std::string& name, const file_type type): OpenDir::DirEntry::DirEntry(const std::string& name, const FileType type): name(name), type(type) { } Loading @@ -15,7 +15,7 @@ OpenDir::OpenDir(const std::string& path): OpenFile(path, 0){ } void OpenDir::add(const std::string& name, const file_type& type){ void OpenDir::add(const std::string& name, const FileType& type){ entries.push_back(DirEntry(name, type)); } Loading @@ -24,7 +24,7 @@ void OpenDir::update_dirent(unsigned int pos){ std::string entry_absolute_path = path_ + "/" + entry.name; dirent_.d_ino = std::hash<std::string>()(entry_absolute_path); dirent_.d_off = pos_; dirent_.d_type = ((entry.type == regular)? DT_REG : DT_DIR); dirent_.d_type = ((entry.type == FileType::regular)? DT_REG : DT_DIR); assert(sizeof(dirent_.d_name) >= strlen(entry.name.c_str())); strcpy(dirent_.d_name, entry.name.c_str()); dirent_.d_reclen = sizeof(dirent_); Loading
ifs/src/preload/rpc/ld_rpc_metadentry.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -479,7 +479,7 @@ void rpc_send_get_dirents(OpenDir& open_dir){ for(unsigned int i = 0; i < out.dirents_size; i++){ file_type ftype = (*bool_ptr)? directory : regular; FileType ftype = (*bool_ptr)? FileType::directory : FileType::regular; bool_ptr++; //Check that we are not outside the recv_buff for this specific host Loading