fix
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good

This commit is contained in:
Scott E. Graves 2024-10-17 17:13:20 -05:00
parent cd538566d3
commit c9f9c2a24c

View File

@ -199,14 +199,17 @@ auto remote_server::fuse_access(const char *path, const std::int32_t &mask)
-> packet::error_type { -> packet::error_type {
REPERTORY_USES_FUNCTION_NAME(); REPERTORY_USES_FUNCTION_NAME();
const auto api_path = utils::path::create_api_path(path);
const auto file_path = construct_path(path);
const auto res = access(file_path.c_str(), mask); const auto res = access(file_path.c_str(), mask);
auto ret = ((res < 0) ? -errno : 0); auto ret = ((res < 0) ? -errno : 0);
RAISE_REMOTE_FUSE_SERVER_EVENT(function_name, file_path, ret); RAISE_REMOTE_FUSE_SERVER_EVENT(function_name, file_path, ret);
return ret; return ret;
} }
auto remote_server::fuse_chflags(const char *path, std::uint32_t flags) auto remote_server::fuse_chflags(const char *path,
-> packet::error_type { std::uint32_t flags) -> packet::error_type {
REPERTORY_USES_FUNCTION_NAME(); REPERTORY_USES_FUNCTION_NAME();
const auto api_path = utils::path::create_api_path(path); const auto api_path = utils::path::create_api_path(path);
@ -313,10 +316,9 @@ length); ret = ((res < 0) ? -errno : 0); #endif
return ret; return ret;
}*/ }*/
auto remote_server::fuse_fgetattr(const char *path, remote::stat &r_stat, auto remote_server::fuse_fgetattr(
bool &directory, const char *path, remote::stat &r_stat, bool &directory,
const remote::file_handle &handle) const remote::file_handle &handle) -> packet::error_type {
-> packet::error_type {
REPERTORY_USES_FUNCTION_NAME(); REPERTORY_USES_FUNCTION_NAME();
r_stat = {}; r_stat = {};
@ -338,10 +340,9 @@ auto remote_server::fuse_fgetattr(const char *path, remote::stat &r_stat,
return ret; return ret;
} }
auto remote_server::fuse_fsetattr_x(const char *path, auto remote_server::fuse_fsetattr_x(
const remote::setattr_x &attr, const char *path, const remote::setattr_x &attr,
const remote::file_handle &handle) const remote::file_handle &handle) -> packet::error_type {
-> packet::error_type {
REPERTORY_USES_FUNCTION_NAME(); REPERTORY_USES_FUNCTION_NAME();
const auto api_path = utils::path::create_api_path(path); const auto api_path = utils::path::create_api_path(path);
@ -457,10 +458,9 @@ auto remote_server::fuse_fsync(const char *path, const std::int32_t &datasync,
return ret; return ret;
} }
auto remote_server::fuse_ftruncate(const char *path, auto remote_server::fuse_ftruncate(
const remote::file_offset &size, const char *path, const remote::file_offset &size,
const remote::file_handle &handle) const remote::file_handle &handle) -> packet::error_type {
-> packet::error_type {
REPERTORY_USES_FUNCTION_NAME(); REPERTORY_USES_FUNCTION_NAME();
const auto file_path = construct_path(path); const auto file_path = construct_path(path);
@ -553,10 +553,9 @@ STATUS_NOT_IMPLEMENTED; #endif RAISE_REMOTE_FUSE_SERVER_EVENT(function_name,
file_path, ret); return ret; file_path, ret); return ret;
}*/ }*/
auto remote_server::fuse_getxtimes(const char *path, auto remote_server::fuse_getxtimes(
remote::file_time &bkuptime, const char *path, remote::file_time &bkuptime,
remote::file_time &crtime) remote::file_time &crtime) -> packet::error_type {
-> packet::error_type {
REPERTORY_USES_FUNCTION_NAME(); REPERTORY_USES_FUNCTION_NAME();
const auto api_path = utils::path::create_api_path(path); const auto api_path = utils::path::create_api_path(path);
@ -656,11 +655,10 @@ auto remote_server::fuse_opendir(const char *path, remote::file_handle &handle)
return ret; return ret;
} }
auto remote_server::fuse_read(const char *path, char *buffer, auto remote_server::fuse_read(
const remote::file_size &read_size, const char *path, char *buffer, const remote::file_size &read_size,
const remote::file_offset &read_offset, const remote::file_offset &read_offset,
const remote::file_handle &handle) const remote::file_handle &handle) -> packet::error_type {
-> packet::error_type {
REPERTORY_USES_FUNCTION_NAME(); REPERTORY_USES_FUNCTION_NAME();
const auto file_path = construct_path(path); const auto file_path = construct_path(path);
@ -681,8 +679,8 @@ auto remote_server::fuse_read(const char *path, char *buffer,
return static_cast<packet::error_type>(ret); return static_cast<packet::error_type>(ret);
} }
auto remote_server::fuse_rename(const char *from, const char *to) auto remote_server::fuse_rename(const char *from,
-> packet::error_type { const char *to) -> packet::error_type {
REPERTORY_USES_FUNCTION_NAME(); REPERTORY_USES_FUNCTION_NAME();
const auto from_path = utils::path::combine(mount_location_, {from}); const auto from_path = utils::path::combine(mount_location_, {from});
@ -720,9 +718,8 @@ auto remote_server::fuse_readdir(const char *path,
return ret; return ret;
} }
auto remote_server::fuse_release(const char *path, auto remote_server::fuse_release(
const remote::file_handle &handle) const char *path, const remote::file_handle &handle) -> packet::error_type {
-> packet::error_type {
REPERTORY_USES_FUNCTION_NAME(); REPERTORY_USES_FUNCTION_NAME();
packet::error_type ret = 0; packet::error_type ret = 0;
@ -739,9 +736,8 @@ auto remote_server::fuse_release(const char *path,
return ret; return ret;
} }
auto remote_server::fuse_releasedir(const char *path, auto remote_server::fuse_releasedir(
const remote::file_handle &handle) const char *path, const remote::file_handle &handle) -> packet::error_type {
-> packet::error_type {
REPERTORY_USES_FUNCTION_NAME(); REPERTORY_USES_FUNCTION_NAME();
const auto file_path = construct_path(path); const auto file_path = construct_path(path);
@ -792,9 +788,8 @@ auto remote_server::fuse_setattr_x(const char *path, remote::setattr_x &attr)
return ret; return ret;
} }
auto remote_server::fuse_setbkuptime(const char *path, auto remote_server::fuse_setbkuptime(
const remote::file_time &bkuptime) const char *path, const remote::file_time &bkuptime) -> packet::error_type {
-> packet::error_type {
REPERTORY_USES_FUNCTION_NAME(); REPERTORY_USES_FUNCTION_NAME();
const auto api_path = utils::path::create_api_path(path); const auto api_path = utils::path::create_api_path(path);
@ -813,9 +808,8 @@ auto remote_server::fuse_setbkuptime(const char *path,
return ret; return ret;
} }
auto remote_server::fuse_setchgtime(const char *path, auto remote_server::fuse_setchgtime(
const remote::file_time &chgtime) const char *path, const remote::file_time &chgtime) -> packet::error_type {
-> packet::error_type {
REPERTORY_USES_FUNCTION_NAME(); REPERTORY_USES_FUNCTION_NAME();
const auto api_path = utils::path::create_api_path(path); const auto api_path = utils::path::create_api_path(path);
@ -834,9 +828,8 @@ auto remote_server::fuse_setchgtime(const char *path,
return ret; return ret;
} }
auto remote_server::fuse_setcrtime(const char *path, auto remote_server::fuse_setcrtime(
const remote::file_time &crtime) const char *path, const remote::file_time &crtime) -> packet::error_type {
-> packet::error_type {
REPERTORY_USES_FUNCTION_NAME(); REPERTORY_USES_FUNCTION_NAME();
const auto api_path = utils::path::create_api_path(path); const auto api_path = utils::path::create_api_path(path);
@ -927,9 +920,8 @@ auto remote_server::fuse_statfs_x(const char *path, std::uint64_t bsize,
return 0; return 0;
} }
auto remote_server::fuse_truncate(const char *path, auto remote_server::fuse_truncate(
const remote::file_offset &size) const char *path, const remote::file_offset &size) -> packet::error_type {
-> packet::error_type {
REPERTORY_USES_FUNCTION_NAME(); REPERTORY_USES_FUNCTION_NAME();
const auto file_path = construct_path(path); const auto file_path = construct_path(path);
@ -950,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, auto remote_server::fuse_utimens(const char *path, const remote::file_time *tv,
std::uint64_t op0, std::uint64_t op1) std::uint64_t op0,
-> packet::error_type { std::uint64_t op1) -> packet::error_type {
REPERTORY_USES_FUNCTION_NAME(); REPERTORY_USES_FUNCTION_NAME();
const auto file_path = construct_path(path); const auto file_path = construct_path(path);
@ -978,11 +970,10 @@ auto remote_server::fuse_utimens(const char *path, const remote::file_time *tv,
return ret; return ret;
} }
auto remote_server::fuse_write(const char *path, const char *buffer, auto remote_server::fuse_write(
const remote::file_size &write_size, const char *path, const char *buffer, const remote::file_size &write_size,
const remote::file_offset &write_offset, const remote::file_offset &write_offset,
const remote::file_handle &handle) const remote::file_handle &handle) -> packet::error_type {
-> packet::error_type {
REPERTORY_USES_FUNCTION_NAME(); REPERTORY_USES_FUNCTION_NAME();
const auto file_path = construct_path(path); const auto file_path = construct_path(path);
@ -1012,8 +1003,8 @@ auto remote_server::fuse_write_base64(
} }
// WinFSP Layer // WinFSP Layer
auto remote_server::winfsp_can_delete(PVOID file_desc, PWSTR file_name) auto remote_server::winfsp_can_delete(PVOID file_desc,
-> packet::error_type { PWSTR file_name) -> packet::error_type {
REPERTORY_USES_FUNCTION_NAME(); REPERTORY_USES_FUNCTION_NAME();
const auto relative_path = utils::string::to_utf8(file_name); const auto relative_path = utils::string::to_utf8(file_name);
@ -1039,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, auto remote_server::winfsp_cleanup(PVOID /*file_desc*/, PWSTR file_name,
UINT32 flags, BOOLEAN &was_closed) UINT32 flags,
-> packet::error_type { BOOLEAN &was_closed) -> packet::error_type {
REPERTORY_USES_FUNCTION_NAME(); REPERTORY_USES_FUNCTION_NAME();
const auto relative_path = utils::string::to_utf8(file_name); const auto relative_path = utils::string::to_utf8(file_name);
@ -1117,8 +1108,8 @@ auto remote_server::winfsp_create(PWSTR file_name, UINT32 create_options,
UINT32 granted_access, UINT32 attributes, UINT32 granted_access, UINT32 attributes,
UINT64 /*allocation_size*/, PVOID *file_desc, UINT64 /*allocation_size*/, PVOID *file_desc,
remote::file_info *file_info, remote::file_info *file_info,
std::string &normalized_name, BOOLEAN &exists) std::string &normalized_name,
-> packet::error_type { BOOLEAN &exists) -> packet::error_type {
REPERTORY_USES_FUNCTION_NAME(); REPERTORY_USES_FUNCTION_NAME();
const auto relative_path = utils::string::to_utf8(file_name); const auto relative_path = utils::string::to_utf8(file_name);
@ -1188,9 +1179,8 @@ auto remote_server::winfsp_flush(PVOID file_desc, remote::file_info *file_info)
return ret; return ret;
} }
auto remote_server::winfsp_get_file_info(PVOID file_desc, auto remote_server::winfsp_get_file_info(
remote::file_info *file_info) PVOID file_desc, remote::file_info *file_info) -> packet::error_type {
-> packet::error_type {
REPERTORY_USES_FUNCTION_NAME(); REPERTORY_USES_FUNCTION_NAME();
const auto handle = reinterpret_cast<remote::file_handle>(file_desc); const auto handle = reinterpret_cast<remote::file_handle>(file_desc);
@ -1233,10 +1223,9 @@ auto remote_server::winfsp_get_security_by_name(
return ret; return ret;
} }
auto remote_server::winfsp_get_volume_info(UINT64 &total_size, auto remote_server::winfsp_get_volume_info(
UINT64 &free_size, UINT64 &total_size, UINT64 &free_size,
std::string &volume_label) std::string &volume_label) -> packet::error_type {
-> packet::error_type {
REPERTORY_USES_FUNCTION_NAME(); REPERTORY_USES_FUNCTION_NAME();
drive_.get_volume_info(total_size, free_size, volume_label); drive_.get_volume_info(total_size, free_size, volume_label);
@ -1253,11 +1242,10 @@ auto remote_server::winfsp_mounted(const std::wstring &location)
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }
auto remote_server::winfsp_open(PWSTR file_name, UINT32 create_options, auto remote_server::winfsp_open(
UINT32 granted_access, PVOID *file_desc, PWSTR file_name, UINT32 create_options, UINT32 granted_access,
remote::file_info *file_info, PVOID *file_desc, remote::file_info *file_info,
std::string &normalized_name) std::string &normalized_name) -> packet::error_type {
-> packet::error_type {
REPERTORY_USES_FUNCTION_NAME(); REPERTORY_USES_FUNCTION_NAME();
const auto relative_path = utils::string::to_utf8(file_name); const auto relative_path = utils::string::to_utf8(file_name);
@ -1293,11 +1281,10 @@ auto remote_server::winfsp_open(PWSTR file_name, UINT32 create_options,
return ret; return ret;
} }
auto remote_server::winfsp_overwrite(PVOID file_desc, UINT32 attributes, auto remote_server::winfsp_overwrite(
BOOLEAN replace_attributes, PVOID file_desc, UINT32 attributes, BOOLEAN replace_attributes,
UINT64 /*allocation_size*/, UINT64 /*allocation_size*/,
remote::file_info *file_info) remote::file_info *file_info) -> packet::error_type {
-> packet::error_type {
REPERTORY_USES_FUNCTION_NAME(); REPERTORY_USES_FUNCTION_NAME();
const auto handle = reinterpret_cast<remote::file_handle>(file_desc); const auto handle = reinterpret_cast<remote::file_handle>(file_desc);
@ -1414,10 +1401,9 @@ auto remote_server::winfsp_read_directory(PVOID file_desc, PWSTR /*pattern*/,
return ret; return ret;
} }
auto remote_server::winfsp_rename(PVOID /*file_desc*/, PWSTR file_name, auto remote_server::winfsp_rename(
PWSTR new_file_name, PVOID /*file_desc*/, PWSTR file_name, PWSTR new_file_name,
BOOLEAN replace_if_exists) BOOLEAN replace_if_exists) -> packet::error_type {
-> packet::error_type {
REPERTORY_USES_FUNCTION_NAME(); REPERTORY_USES_FUNCTION_NAME();
const auto relative_path = utils::string::to_utf8(file_name); const auto relative_path = utils::string::to_utf8(file_name);
@ -1511,10 +1497,9 @@ auto remote_server::winfsp_set_basic_info(
return ret; return ret;
} }
auto remote_server::winfsp_set_file_size(PVOID file_desc, UINT64 new_size, auto remote_server::winfsp_set_file_size(
BOOLEAN set_allocation_size, PVOID file_desc, UINT64 new_size, BOOLEAN set_allocation_size,
remote::file_info *file_info) remote::file_info *file_info) -> packet::error_type {
-> packet::error_type {
REPERTORY_USES_FUNCTION_NAME(); REPERTORY_USES_FUNCTION_NAME();
const auto handle = reinterpret_cast<remote::file_handle>(file_desc); const auto handle = reinterpret_cast<remote::file_handle>(file_desc);
@ -1550,12 +1535,10 @@ auto remote_server::winfsp_unmounted(const std::wstring &location)
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }
auto remote_server::winfsp_write(PVOID file_desc, PVOID buffer, UINT64 offset, auto remote_server::winfsp_write(
UINT32 length, BOOLEAN write_to_end, PVOID file_desc, PVOID buffer, UINT64 offset, UINT32 length,
BOOLEAN constrained_io, BOOLEAN write_to_end, BOOLEAN constrained_io, PUINT32 bytes_transferred,
PUINT32 bytes_transferred, remote::file_info *file_info) -> packet::error_type {
remote::file_info *file_info)
-> packet::error_type {
REPERTORY_USES_FUNCTION_NAME(); REPERTORY_USES_FUNCTION_NAME();
*bytes_transferred = 0; *bytes_transferred = 0;
@ -1603,9 +1586,8 @@ auto remote_server::winfsp_write(PVOID file_desc, PVOID buffer, UINT64 offset,
return ret; return ret;
} }
auto remote_server::json_create_directory_snapshot(const std::string &path, auto remote_server::json_create_directory_snapshot(
json &json_data) const std::string &path, json &json_data) -> packet::error_type {
-> packet::error_type {
REPERTORY_USES_FUNCTION_NAME(); REPERTORY_USES_FUNCTION_NAME();
const auto api_path = utils::path::create_api_path(path); const auto api_path = utils::path::create_api_path(path);
@ -1664,8 +1646,8 @@ auto remote_server::json_read_directory_snapshot(
} }
auto remote_server::json_release_directory_snapshot( auto remote_server::json_release_directory_snapshot(
const std::string &path, const remote::file_handle &handle) const std::string &path,
-> packet::error_type { const remote::file_handle &handle) -> packet::error_type {
REPERTORY_USES_FUNCTION_NAME(); REPERTORY_USES_FUNCTION_NAME();
const auto file_path = construct_path(path); const auto file_path = construct_path(path);