diff --git a/repertory/librepertory/include/drives/winfsp/winfsp_drive.hpp b/repertory/librepertory/include/drives/winfsp/winfsp_drive.hpp index 0a14c208..28bb1858 100644 --- a/repertory/librepertory/include/drives/winfsp/winfsp_drive.hpp +++ b/repertory/librepertory/include/drives/winfsp/winfsp_drive.hpp @@ -157,7 +157,10 @@ public: auto Init(PVOID host) -> NTSTATUS override; - [[nodiscard]] auto mount(const std::vector &drive_args) -> int; + [[nodiscard]] auto mount(std::vector orig_args, + std::vector drive_args, + provider_type prov, std::string_view unique_id) + -> int; auto Mounted(PVOID host) -> NTSTATUS override; diff --git a/repertory/librepertory/src/drives/winfsp/winfsp_drive.cpp b/repertory/librepertory/src/drives/winfsp/winfsp_drive.cpp index 2bd33f9f..a663e129 100644 --- a/repertory/librepertory/src/drives/winfsp/winfsp_drive.cpp +++ b/repertory/librepertory/src/drives/winfsp/winfsp_drive.cpp @@ -590,7 +590,10 @@ auto winfsp_drive::Init(PVOID host) -> NTSTATUS { return STATUS_SUCCESS; } -auto winfsp_drive::mount(const std::vector &drive_args) -> int { +auto winfsp_drive::mount(std::vector /* orig_args */, + std::vector drive_args, + provider_type /* prov */, + std::string_view /* unique_id */) -> int { REPERTORY_USES_FUNCTION_NAME(); std::vector parsed_drive_args; diff --git a/repertory/repertory_test/include/fixtures/fuse_fixture.hpp b/repertory/repertory_test/include/fixtures/fuse_fixture.hpp index 07491b53..be55050a 100644 --- a/repertory/repertory_test/include/fixtures/fuse_fixture.hpp +++ b/repertory/repertory_test/include/fixtures/fuse_fixture.hpp @@ -54,31 +54,31 @@ namespace repertory { struct local_s3 final { static constexpr provider_type type{provider_type::s3}; static constexpr provider_type type2{provider_type::s3}; - static constexpr std::uint16_t port{0U}; + static constexpr std::uint16_t remote_port{40000U}; }; struct local_sia final { static constexpr provider_type type{provider_type::sia}; static constexpr provider_type type2{provider_type::sia}; - static constexpr std::uint16_t port{0U}; + static constexpr std::uint16_t remote_port{40001U}; }; struct remote_s3 final { static constexpr provider_type type{provider_type::remote}; static constexpr provider_type type2{provider_type::s3}; - static constexpr std::uint16_t port{0U}; + static constexpr std::uint16_t remote_port{40000U}; }; struct remote_sia final { static constexpr provider_type type{provider_type::remote}; static constexpr provider_type type2{provider_type::sia}; - static constexpr std::uint16_t port{0U}; + static constexpr std::uint16_t remote_port{40001U}; }; struct remote_linux_to_winfsp final { static constexpr provider_type type{provider_type::remote}; static constexpr provider_type type2{provider_type::unknown}; - static constexpr std::uint16_t port{40001U}; + static constexpr std::uint16_t remote_port{40002U}; }; template class fuse_test : public ::testing::Test { @@ -123,7 +123,7 @@ protected: auto r_cfg = config->get_remote_mount(); r_cfg.enable = true; - r_cfg.api_port = 40000U; + r_cfg.api_port = provider_t::remote_port; config->set_remote_mount(r_cfg); } @@ -169,7 +169,7 @@ protected: auto r_cfg = config->get_remote_mount(); r_cfg.enable = true; - r_cfg.api_port = 40000U; + r_cfg.api_port = provider_t::remote_port; config->set_remote_mount(r_cfg); } @@ -186,7 +186,7 @@ protected: execute_mount(drive_args, mount_location); }; - const auto mount_remote = [&](std::uint16_t port = 40000U) { + const auto mount_remote = [&](std::uint16_t remote_port) { { mount_location2 = mount_location; auto test_directory = utils::path::combine( @@ -195,7 +195,7 @@ protected: "fuse_test", app_config::get_provider_name(provider_t::type) + '_' + app_config::get_provider_name(provider_t::type2) + '_' + - std::to_string(port), + std::to_string(remote_port), }); mount_location = utils::path::combine(test_directory, {"mount"}); @@ -214,7 +214,7 @@ protected: "-dd", config2->get_data_directory(), "-rm", - fmt::format("localhost:{}", port), + fmt::format("localhost:{}", remote_port), }); } @@ -241,7 +241,7 @@ protected: } break; case provider_type::unknown: - mount_remote(provider_t::port); + mount_remote(provider_t::remote_port); return; default: @@ -249,7 +249,7 @@ protected: return; } - mount_remote(); + mount_remote(provider_t::remote_port); } break; default: