diff --git a/repertory/librepertory/src/drives/fuse/remotefuse/remote_server.cpp b/repertory/librepertory/src/drives/fuse/remotefuse/remote_server.cpp index 399a5308..66115976 100644 --- a/repertory/librepertory/src/drives/fuse/remotefuse/remote_server.cpp +++ b/repertory/librepertory/src/drives/fuse/remotefuse/remote_server.cpp @@ -208,8 +208,8 @@ auto remote_server::fuse_access(const char *path, const std::int32_t &mask) return ret; } -auto remote_server::fuse_chflags(const char *path, std::uint32_t flags) - -> packet::error_type { +auto remote_server::fuse_chflags(const char *path, + std::uint32_t flags) -> packet::error_type { REPERTORY_USES_FUNCTION_NAME(); const auto api_path = utils::path::create_api_path(path); @@ -316,10 +316,9 @@ length); ret = ((res < 0) ? -errno : 0); #endif return ret; }*/ -auto remote_server::fuse_fgetattr(const char *path, remote::stat &r_stat, - bool &directory, - const remote::file_handle &handle) - -> packet::error_type { +auto remote_server::fuse_fgetattr( + const char *path, remote::stat &r_stat, bool &directory, + const remote::file_handle &handle) -> packet::error_type { REPERTORY_USES_FUNCTION_NAME(); r_stat = {}; @@ -329,7 +328,7 @@ auto remote_server::fuse_fgetattr(const char *path, remote::stat &r_stat, auto res = has_open_info(static_cast(handle), EBADF); if (res == 0) { directory = utils::file::directory(file_path).exists(); - struct stat64 unix_st{}; + struct stat64 unix_st {}; res = fstat64(static_cast(handle), &unix_st); if (res == 0) { populate_stat(unix_st, r_stat); @@ -341,10 +340,9 @@ auto remote_server::fuse_fgetattr(const char *path, remote::stat &r_stat, return ret; } -auto remote_server::fuse_fsetattr_x(const char *path, - const remote::setattr_x &attr, - const remote::file_handle &handle) - -> packet::error_type { +auto remote_server::fuse_fsetattr_x( + const char *path, const remote::setattr_x &attr, + const remote::file_handle &handle) -> packet::error_type { REPERTORY_USES_FUNCTION_NAME(); const auto api_path = utils::path::create_api_path(path); @@ -460,10 +458,9 @@ auto remote_server::fuse_fsync(const char *path, const std::int32_t &datasync, return ret; } -auto remote_server::fuse_ftruncate(const char *path, - const remote::file_offset &size, - const remote::file_handle &handle) - -> packet::error_type { +auto remote_server::fuse_ftruncate( + const char *path, const remote::file_offset &size, + const remote::file_handle &handle) -> packet::error_type { REPERTORY_USES_FUNCTION_NAME(); const auto file_path = construct_path(path); @@ -491,7 +488,7 @@ auto remote_server::fuse_getattr(const char *path, remote::stat &r_stat, directory = utils::file::directory(file_path).exists(); - struct stat64 unix_st{}; + struct stat64 unix_st {}; auto res = stat64(file_path.c_str(), &unix_st); if (res == 0) { populate_stat(unix_st, r_stat); @@ -556,10 +553,9 @@ STATUS_NOT_IMPLEMENTED; #endif RAISE_REMOTE_FUSE_SERVER_EVENT(function_name, file_path, ret); return ret; }*/ -auto remote_server::fuse_getxtimes(const char *path, - remote::file_time &bkuptime, - remote::file_time &crtime) - -> packet::error_type { +auto remote_server::fuse_getxtimes( + const char *path, remote::file_time &bkuptime, + remote::file_time &crtime) -> packet::error_type { REPERTORY_USES_FUNCTION_NAME(); const auto api_path = utils::path::create_api_path(path); @@ -659,11 +655,10 @@ auto remote_server::fuse_opendir(const char *path, remote::file_handle &handle) return ret; } -auto remote_server::fuse_read(const char *path, char *buffer, - const remote::file_size &read_size, - const remote::file_offset &read_offset, - const remote::file_handle &handle) - -> packet::error_type { +auto remote_server::fuse_read( + const char *path, char *buffer, const remote::file_size &read_size, + const remote::file_offset &read_offset, + const remote::file_handle &handle) -> packet::error_type { REPERTORY_USES_FUNCTION_NAME(); const auto file_path = construct_path(path); @@ -684,8 +679,8 @@ auto remote_server::fuse_read(const char *path, char *buffer, return static_cast(ret); } -auto remote_server::fuse_rename(const char *from, const char *to) - -> packet::error_type { +auto remote_server::fuse_rename(const char *from, + const char *to) -> packet::error_type { REPERTORY_USES_FUNCTION_NAME(); const auto from_path = utils::path::combine(mount_location_, {from}); @@ -723,9 +718,8 @@ auto remote_server::fuse_readdir(const char *path, return ret; } -auto remote_server::fuse_release(const char *path, - const remote::file_handle &handle) - -> packet::error_type { +auto remote_server::fuse_release( + const char *path, const remote::file_handle &handle) -> packet::error_type { REPERTORY_USES_FUNCTION_NAME(); packet::error_type ret = 0; @@ -742,9 +736,8 @@ auto remote_server::fuse_release(const char *path, return ret; } -auto remote_server::fuse_releasedir(const char *path, - const remote::file_handle &handle) - -> packet::error_type { +auto remote_server::fuse_releasedir( + const char *path, const remote::file_handle &handle) -> packet::error_type { REPERTORY_USES_FUNCTION_NAME(); const auto file_path = construct_path(path); @@ -795,9 +788,8 @@ auto remote_server::fuse_setattr_x(const char *path, remote::setattr_x &attr) return ret; } -auto remote_server::fuse_setbkuptime(const char *path, - const remote::file_time &bkuptime) - -> packet::error_type { +auto remote_server::fuse_setbkuptime( + const char *path, const remote::file_time &bkuptime) -> packet::error_type { REPERTORY_USES_FUNCTION_NAME(); const auto api_path = utils::path::create_api_path(path); @@ -816,9 +808,8 @@ auto remote_server::fuse_setbkuptime(const char *path, return ret; } -auto remote_server::fuse_setchgtime(const char *path, - const remote::file_time &chgtime) - -> packet::error_type { +auto remote_server::fuse_setchgtime( + const char *path, const remote::file_time &chgtime) -> packet::error_type { REPERTORY_USES_FUNCTION_NAME(); const auto api_path = utils::path::create_api_path(path); @@ -837,9 +828,8 @@ auto remote_server::fuse_setchgtime(const char *path, return ret; } -auto remote_server::fuse_setcrtime(const char *path, - const remote::file_time &crtime) - -> packet::error_type { +auto remote_server::fuse_setcrtime( + const char *path, const remote::file_time &crtime) -> packet::error_type { REPERTORY_USES_FUNCTION_NAME(); const auto api_path = utils::path::create_api_path(path); @@ -930,9 +920,8 @@ auto remote_server::fuse_statfs_x(const char *path, std::uint64_t bsize, return 0; } -auto remote_server::fuse_truncate(const char *path, - const remote::file_offset &size) - -> packet::error_type { +auto remote_server::fuse_truncate( + const char *path, const remote::file_offset &size) -> packet::error_type { REPERTORY_USES_FUNCTION_NAME(); const auto file_path = construct_path(path); @@ -953,8 +942,8 @@ auto remote_server::fuse_unlink(const char *path) -> packet::error_type { } auto remote_server::fuse_utimens(const char *path, const remote::file_time *tv, - std::uint64_t op0, std::uint64_t op1) - -> packet::error_type { + std::uint64_t op0, + std::uint64_t op1) -> packet::error_type { REPERTORY_USES_FUNCTION_NAME(); const auto file_path = construct_path(path); @@ -981,11 +970,10 @@ auto remote_server::fuse_utimens(const char *path, const remote::file_time *tv, return ret; } -auto remote_server::fuse_write(const char *path, const char *buffer, - const remote::file_size &write_size, - const remote::file_offset &write_offset, - const remote::file_handle &handle) - -> packet::error_type { +auto remote_server::fuse_write( + const char *path, const char *buffer, const remote::file_size &write_size, + const remote::file_offset &write_offset, + const remote::file_handle &handle) -> packet::error_type { REPERTORY_USES_FUNCTION_NAME(); const auto file_path = construct_path(path); @@ -1015,8 +1003,8 @@ auto remote_server::fuse_write_base64( } // WinFSP Layer -auto remote_server::winfsp_can_delete(PVOID file_desc, PWSTR file_name) - -> packet::error_type { +auto remote_server::winfsp_can_delete(PVOID file_desc, + PWSTR file_name) -> packet::error_type { REPERTORY_USES_FUNCTION_NAME(); const auto relative_path = utils::string::to_utf8(file_name); @@ -1042,8 +1030,8 @@ auto remote_server::winfsp_can_delete(PVOID file_desc, PWSTR file_name) } auto remote_server::winfsp_cleanup(PVOID /*file_desc*/, PWSTR file_name, - UINT32 flags, BOOLEAN &was_closed) - -> packet::error_type { + UINT32 flags, + BOOLEAN &was_closed) -> packet::error_type { REPERTORY_USES_FUNCTION_NAME(); const auto relative_path = utils::string::to_utf8(file_name); @@ -1120,8 +1108,8 @@ auto remote_server::winfsp_create(PWSTR file_name, UINT32 create_options, UINT32 granted_access, UINT32 attributes, UINT64 /*allocation_size*/, PVOID *file_desc, remote::file_info *file_info, - std::string &normalized_name, BOOLEAN &exists) - -> packet::error_type { + std::string &normalized_name, + BOOLEAN &exists) -> packet::error_type { REPERTORY_USES_FUNCTION_NAME(); const auto relative_path = utils::string::to_utf8(file_name); @@ -1188,9 +1176,8 @@ auto remote_server::winfsp_flush(PVOID file_desc, remote::file_info *file_info) return ret; } -auto remote_server::winfsp_get_file_info(PVOID file_desc, - remote::file_info *file_info) - -> packet::error_type { +auto remote_server::winfsp_get_file_info( + PVOID file_desc, remote::file_info *file_info) -> packet::error_type { REPERTORY_USES_FUNCTION_NAME(); const auto handle = reinterpret_cast(file_desc); @@ -1233,10 +1220,9 @@ auto remote_server::winfsp_get_security_by_name( return ret; } -auto remote_server::winfsp_get_volume_info(UINT64 &total_size, - UINT64 &free_size, - std::string &volume_label) - -> packet::error_type { +auto remote_server::winfsp_get_volume_info( + UINT64 &total_size, UINT64 &free_size, + std::string &volume_label) -> packet::error_type { REPERTORY_USES_FUNCTION_NAME(); drive_.get_volume_info(total_size, free_size, volume_label); @@ -1253,11 +1239,10 @@ auto remote_server::winfsp_mounted(const std::wstring &location) return STATUS_SUCCESS; } -auto remote_server::winfsp_open(PWSTR file_name, UINT32 create_options, - UINT32 granted_access, PVOID *file_desc, - remote::file_info *file_info, - std::string &normalized_name) - -> packet::error_type { +auto remote_server::winfsp_open( + PWSTR file_name, UINT32 create_options, UINT32 granted_access, + PVOID *file_desc, remote::file_info *file_info, + std::string &normalized_name) -> packet::error_type { REPERTORY_USES_FUNCTION_NAME(); const auto relative_path = utils::string::to_utf8(file_name); @@ -1293,11 +1278,10 @@ auto remote_server::winfsp_open(PWSTR file_name, UINT32 create_options, return ret; } -auto remote_server::winfsp_overwrite(PVOID file_desc, UINT32 attributes, - BOOLEAN replace_attributes, - UINT64 /*allocation_size*/, - remote::file_info *file_info) - -> packet::error_type { +auto remote_server::winfsp_overwrite( + PVOID file_desc, UINT32 attributes, BOOLEAN replace_attributes, + UINT64 /*allocation_size*/, + remote::file_info *file_info) -> packet::error_type { REPERTORY_USES_FUNCTION_NAME(); const auto handle = reinterpret_cast(file_desc); @@ -1413,10 +1397,9 @@ auto remote_server::winfsp_read_directory(PVOID file_desc, PWSTR /*pattern*/, return ret; } -auto remote_server::winfsp_rename(PVOID /*file_desc*/, PWSTR file_name, - PWSTR new_file_name, - BOOLEAN replace_if_exists) - -> packet::error_type { +auto remote_server::winfsp_rename( + PVOID /*file_desc*/, PWSTR file_name, PWSTR new_file_name, + BOOLEAN replace_if_exists) -> packet::error_type { REPERTORY_USES_FUNCTION_NAME(); const auto relative_path = utils::string::to_utf8(file_name); @@ -1467,7 +1450,7 @@ auto remote_server::winfsp_set_basic_info( api_meta_map meta; if (attributes != 0U) { attributes &= static_cast(~FILE_ATTRIBUTE_NORMAL); - if (attributes == = 0U) { + if (attributes == 0U) { attributes |= static_cast(FILE_ATTRIBUTE_ARCHIVE); } drive_.set_item_meta(api_path, META_ATTRIBUTES, @@ -1510,10 +1493,9 @@ auto remote_server::winfsp_set_basic_info( return ret; } -auto remote_server::winfsp_set_file_size(PVOID file_desc, UINT64 new_size, - BOOLEAN set_allocation_size, - remote::file_info *file_info) - -> packet::error_type { +auto remote_server::winfsp_set_file_size( + PVOID file_desc, UINT64 new_size, BOOLEAN set_allocation_size, + remote::file_info *file_info) -> packet::error_type { REPERTORY_USES_FUNCTION_NAME(); const auto handle = reinterpret_cast(file_desc); @@ -1549,12 +1531,10 @@ auto remote_server::winfsp_unmounted(const std::wstring &location) return STATUS_SUCCESS; } -auto remote_server::winfsp_write(PVOID file_desc, PVOID buffer, UINT64 offset, - UINT32 length, BOOLEAN write_to_end, - BOOLEAN constrained_io, - PUINT32 bytes_transferred, - remote::file_info *file_info) - -> packet::error_type { +auto remote_server::winfsp_write( + PVOID file_desc, PVOID buffer, UINT64 offset, UINT32 length, + BOOLEAN write_to_end, BOOLEAN constrained_io, PUINT32 bytes_transferred, + remote::file_info *file_info) -> packet::error_type { REPERTORY_USES_FUNCTION_NAME(); *bytes_transferred = 0; @@ -1602,9 +1582,8 @@ auto remote_server::winfsp_write(PVOID file_desc, PVOID buffer, UINT64 offset, return ret; } -auto remote_server::json_create_directory_snapshot(const std::string &path, - json &json_data) - -> packet::error_type { +auto remote_server::json_create_directory_snapshot( + const std::string &path, json &json_data) -> packet::error_type { REPERTORY_USES_FUNCTION_NAME(); const auto api_path = utils::path::create_api_path(path); @@ -1663,8 +1642,8 @@ auto remote_server::json_read_directory_snapshot( } auto remote_server::json_release_directory_snapshot( - const std::string &path, const remote::file_handle &handle) - -> packet::error_type { + const std::string &path, + const remote::file_handle &handle) -> packet::error_type { REPERTORY_USES_FUNCTION_NAME(); const auto file_path = construct_path(path);