updated build system
	
		
			
	
		
	
	
		
	
		
			Some checks failed
		
		
	
	
		
			
				
	
				BlockStorage/repertory/pipeline/head There was a failure building this commit
				
			
		
		
	
	
				
					
				
			
		
			Some checks failed
		
		
	
	BlockStorage/repertory/pipeline/head There was a failure building this commit
				
			This commit is contained in:
		| @@ -181,6 +181,7 @@ inline constexpr const auto NANOS_PER_SECOND = 1000000000L; | |||||||
| using BOOLEAN = std::uint8_t; | using BOOLEAN = std::uint8_t; | ||||||
| using DWORD = std::uint32_t; | using DWORD = std::uint32_t; | ||||||
| using HANDLE = void *; | using HANDLE = void *; | ||||||
|  | using NTSTATUS = std::uint32_t; | ||||||
| using PUINT32 = std::uint32_t *; | using PUINT32 = std::uint32_t *; | ||||||
| using PVOID = void *; | using PVOID = void *; | ||||||
| using PWSTR = wchar_t *; | using PWSTR = wchar_t *; | ||||||
| @@ -231,7 +232,7 @@ using WCHAR = wchar_t; | |||||||
| #define MAX_PATH 260 | #define MAX_PATH 260 | ||||||
|  |  | ||||||
| #define STATUS_SUCCESS                                                         \ | #define STATUS_SUCCESS                                                         \ | ||||||
|   std::uint32_t { 0 } |   std::uint32_t { 0U } | ||||||
| #define STATUS_ACCESS_DENIED                                                   \ | #define STATUS_ACCESS_DENIED                                                   \ | ||||||
|   std::uint32_t { 0xC0000022L } |   std::uint32_t { 0xC0000022L } | ||||||
| #define STATUS_DEVICE_BUSY                                                     \ | #define STATUS_DEVICE_BUSY                                                     \ | ||||||
| @@ -263,14 +264,14 @@ using WCHAR = wchar_t; | |||||||
| #define STATUS_OBJECT_NAME_EXISTS                                              \ | #define STATUS_OBJECT_NAME_EXISTS                                              \ | ||||||
|   std::uint32_t { 0x40000000L } |   std::uint32_t { 0x40000000L } | ||||||
| #define STATUS_OBJECT_NAME_NOT_FOUND                                           \ | #define STATUS_OBJECT_NAME_NOT_FOUND                                           \ | ||||||
|   std::int32_t { 0xC0000034L } |   std::uint32_t { 0xC0000034L } | ||||||
| #define STATUS_OBJECT_PATH_INVALID                                             \ | #define STATUS_OBJECT_PATH_INVALID                                             \ | ||||||
|   std::uint32_t { 0xC0000039L } |   std::uint32_t { 0xC0000039L } | ||||||
| #define STATUS_UNEXPECTED_IO_ERROR                                             \ | #define STATUS_UNEXPECTED_IO_ERROR                                             \ | ||||||
|   std::uint32_t { 0xC00000E9L } |   std::uint32_t { 0xC00000E9L } | ||||||
|  |  | ||||||
| #define CONVERT_STATUS_NOT_IMPLEMENTED(e)                                      \ | #define CONVERT_STATUS_NOT_IMPLEMENTED(e)                                      \ | ||||||
|   ((std::uint32_t{e} == STATUS_NOT_IMPLEMENTED) ? -ENOTSUP : e) |   ((std::uint32_t(e) == STATUS_NOT_IMPLEMENTED) ? -ENOTSUP : e) | ||||||
|  |  | ||||||
| namespace Fsp::FileSystemBase { | namespace Fsp::FileSystemBase { | ||||||
| enum { | enum { | ||||||
|   | |||||||
| @@ -226,7 +226,7 @@ public: | |||||||
|   [[nodiscard]] auto |   [[nodiscard]] auto | ||||||
|   winfsp_get_dir_buffer(PVOID /*file_desc*/, |   winfsp_get_dir_buffer(PVOID /*file_desc*/, | ||||||
|                         PVOID *& /*ptr*/) -> packet::error_type override { |                         PVOID *& /*ptr*/) -> packet::error_type override { | ||||||
|     return STATUS_INVALID_HANDLE; |     return static_cast<packet::error_type>(STATUS_INVALID_HANDLE); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   [[nodiscard]] auto json_create_directory_snapshot( |   [[nodiscard]] auto json_create_directory_snapshot( | ||||||
|   | |||||||
| @@ -59,7 +59,7 @@ public: | |||||||
|          [this](std::uint32_t, const std::string &, std::uint64_t, |          [this](std::uint32_t, const std::string &, std::uint64_t, | ||||||
|                 const std::string &, packet *request, |                 const std::string &, packet *request, | ||||||
|                 packet &) -> packet::error_type { |                 packet &) -> packet::error_type { | ||||||
|            auto ret = STATUS_SUCCESS; |            auto ret = static_cast<packet::error_type>(STATUS_SUCCESS); | ||||||
|  |  | ||||||
|            HANDLE file_desc{}; |            HANDLE file_desc{}; | ||||||
|            DECODE_OR_RETURN(request, file_desc); |            DECODE_OR_RETURN(request, file_desc); | ||||||
| @@ -74,7 +74,7 @@ public: | |||||||
|          [this](std::uint32_t, const std::string &, std::uint64_t, |          [this](std::uint32_t, const std::string &, std::uint64_t, | ||||||
|                 const std::string &, packet *request, |                 const std::string &, packet *request, | ||||||
|                 packet &response) -> packet::error_type { |                 packet &response) -> packet::error_type { | ||||||
|            auto ret = STATUS_SUCCESS; |            auto ret = static_cast<packet::error_type>(STATUS_SUCCESS); | ||||||
|  |  | ||||||
|            HANDLE file_desc{}; |            HANDLE file_desc{}; | ||||||
|            DECODE_OR_RETURN(request, file_desc); |            DECODE_OR_RETURN(request, file_desc); | ||||||
| @@ -97,7 +97,7 @@ public: | |||||||
|          [this](std::uint32_t, const std::string &, std::uint64_t, |          [this](std::uint32_t, const std::string &, std::uint64_t, | ||||||
|                 const std::string &, packet *request, |                 const std::string &, packet *request, | ||||||
|                 packet &) -> packet::error_type { |                 packet &) -> packet::error_type { | ||||||
|            auto ret = STATUS_SUCCESS; |            auto ret = static_cast<packet::error_type>(STATUS_SUCCESS); | ||||||
|  |  | ||||||
|            HANDLE file_desc{}; |            HANDLE file_desc{}; | ||||||
|            DECODE_OR_RETURN(request, file_desc); |            DECODE_OR_RETURN(request, file_desc); | ||||||
| @@ -109,7 +109,7 @@ public: | |||||||
|          [this](std::uint32_t, const std::string &client_id, std::uint64_t, |          [this](std::uint32_t, const std::string &client_id, std::uint64_t, | ||||||
|                 const std::string &, packet *request, |                 const std::string &, packet *request, | ||||||
|                 packet &response) -> packet::error_type { |                 packet &response) -> packet::error_type { | ||||||
|            auto ret = STATUS_SUCCESS; |            auto ret = static_cast<packet::error_type>(STATUS_SUCCESS); | ||||||
|  |  | ||||||
|            std::wstring file_name; |            std::wstring file_name; | ||||||
|            DECODE_OR_RETURN(request, file_name); |            DECODE_OR_RETURN(request, file_name); | ||||||
| @@ -156,7 +156,7 @@ public: | |||||||
|          [this](std::uint32_t, const std::string &, std::uint64_t, |          [this](std::uint32_t, const std::string &, std::uint64_t, | ||||||
|                 const std::string &, packet *request, |                 const std::string &, packet *request, | ||||||
|                 packet &response) -> packet::error_type { |                 packet &response) -> packet::error_type { | ||||||
|            auto ret = STATUS_SUCCESS; |            auto ret = static_cast<packet::error_type>(STATUS_SUCCESS); | ||||||
|  |  | ||||||
|            HANDLE file_desc{}; |            HANDLE file_desc{}; | ||||||
|            DECODE_OR_RETURN(request, file_desc); |            DECODE_OR_RETURN(request, file_desc); | ||||||
| @@ -174,7 +174,7 @@ public: | |||||||
|          [this](std::uint32_t, const std::string &, std::uint64_t, |          [this](std::uint32_t, const std::string &, std::uint64_t, | ||||||
|                 const std::string &, packet *request, |                 const std::string &, packet *request, | ||||||
|                 packet &response) -> packet::error_type { |                 packet &response) -> packet::error_type { | ||||||
|            auto ret = STATUS_SUCCESS; |            auto ret = static_cast<packet::error_type>(STATUS_SUCCESS); | ||||||
|  |  | ||||||
|            HANDLE file_desc{}; |            HANDLE file_desc{}; | ||||||
|            DECODE_OR_RETURN(request, file_desc); |            DECODE_OR_RETURN(request, file_desc); | ||||||
| @@ -191,7 +191,7 @@ public: | |||||||
|          [this](std::uint32_t, const std::string &, std::uint64_t, |          [this](std::uint32_t, const std::string &, std::uint64_t, | ||||||
|                 const std::string &, packet *request, |                 const std::string &, packet *request, | ||||||
|                 packet &response) -> packet::error_type { |                 packet &response) -> packet::error_type { | ||||||
|            auto ret = STATUS_SUCCESS; |            auto ret = static_cast<packet::error_type>(STATUS_SUCCESS); | ||||||
|  |  | ||||||
|            std::wstring file_name; |            std::wstring file_name; | ||||||
|            DECODE_OR_RETURN(request, file_name); |            DECODE_OR_RETURN(request, file_name); | ||||||
| @@ -218,18 +218,18 @@ public: | |||||||
|  |  | ||||||
|            return ret; |            return ret; | ||||||
|          }}); |          }}); | ||||||
|     handler_lookup_.insert({"::winfsp_get_volume_info", |     handler_lookup_.insert( | ||||||
|                             [this](std::uint32_t, const std::string &, |         {"::winfsp_get_volume_info", | ||||||
|                                    std::uint64_t, const std::string &, packet *, |          [this](std::uint32_t, const std::string &, std::uint64_t, | ||||||
|  |                 const std::string &, packet *, | ||||||
|                 packet &response) -> packet::error_type { |                 packet &response) -> packet::error_type { | ||||||
|                               auto ret = STATUS_SUCCESS; |            auto ret = static_cast<packet::error_type>(STATUS_SUCCESS); | ||||||
|  |  | ||||||
|            UINT64 total_size{}; |            UINT64 total_size{}; | ||||||
|            UINT64 free_size{}; |            UINT64 free_size{}; | ||||||
|            std::string volume_label; |            std::string volume_label; | ||||||
|            if ((ret = this->winfsp_get_volume_info( |            if ((ret = this->winfsp_get_volume_info( | ||||||
|                                        total_size, free_size, volume_label)) == |                     total_size, free_size, volume_label)) == STATUS_SUCCESS) { | ||||||
|                                   STATUS_SUCCESS) { |  | ||||||
|              response.encode(total_size); |              response.encode(total_size); | ||||||
|              response.encode(free_size); |              response.encode(free_size); | ||||||
|              response.encode(volume_label); |              response.encode(volume_label); | ||||||
| @@ -241,7 +241,7 @@ public: | |||||||
|          [this](std::uint32_t, const std::string &, std::uint64_t, |          [this](std::uint32_t, const std::string &, std::uint64_t, | ||||||
|                 const std::string &, packet *request, |                 const std::string &, packet *request, | ||||||
|                 packet &) -> packet::error_type { |                 packet &) -> packet::error_type { | ||||||
|            auto ret = STATUS_SUCCESS; |            auto ret = static_cast<packet::error_type>(STATUS_SUCCESS); | ||||||
|  |  | ||||||
|            std::string version; |            std::string version; | ||||||
|            DECODE_OR_RETURN(request, version); |            DECODE_OR_RETURN(request, version); | ||||||
| @@ -257,7 +257,7 @@ public: | |||||||
|          [this](std::uint32_t, const std::string &client_id, std::uint64_t, |          [this](std::uint32_t, const std::string &client_id, std::uint64_t, | ||||||
|                 const std::string &, packet *request, |                 const std::string &, packet *request, | ||||||
|                 packet &response) -> packet::error_type { |                 packet &response) -> packet::error_type { | ||||||
|            auto ret = STATUS_SUCCESS; |            auto ret = static_cast<packet::error_type>(STATUS_SUCCESS); | ||||||
|  |  | ||||||
|            std::wstring file_name; |            std::wstring file_name; | ||||||
|            DECODE_OR_RETURN(request, file_name); |            DECODE_OR_RETURN(request, file_name); | ||||||
| @@ -295,7 +295,7 @@ public: | |||||||
|          [this](std::uint32_t, const std::string &, std::uint64_t, |          [this](std::uint32_t, const std::string &, std::uint64_t, | ||||||
|                 const std::string &, packet *request, |                 const std::string &, packet *request, | ||||||
|                 packet &response) -> packet::error_type { |                 packet &response) -> packet::error_type { | ||||||
|            auto ret = STATUS_SUCCESS; |            auto ret = static_cast<packet::error_type>(STATUS_SUCCESS); | ||||||
|  |  | ||||||
|            HANDLE file_desc{}; |            HANDLE file_desc{}; | ||||||
|            DECODE_OR_RETURN(request, file_desc); |            DECODE_OR_RETURN(request, file_desc); | ||||||
| @@ -323,7 +323,7 @@ public: | |||||||
|          [this](std::uint32_t, const std::string &, std::uint64_t, |          [this](std::uint32_t, const std::string &, std::uint64_t, | ||||||
|                 const std::string &, packet *request, |                 const std::string &, packet *request, | ||||||
|                 packet &response) -> packet::error_type { |                 packet &response) -> packet::error_type { | ||||||
|            auto ret = STATUS_SUCCESS; |            auto ret = static_cast<packet::error_type>(STATUS_SUCCESS); | ||||||
|  |  | ||||||
|            HANDLE file_desc{}; |            HANDLE file_desc{}; | ||||||
|            DECODE_OR_RETURN(request, file_desc); |            DECODE_OR_RETURN(request, file_desc); | ||||||
| @@ -351,7 +351,7 @@ public: | |||||||
|          [this](std::uint32_t, const std::string &, std::uint64_t, |          [this](std::uint32_t, const std::string &, std::uint64_t, | ||||||
|                 const std::string &, packet *request, |                 const std::string &, packet *request, | ||||||
|                 packet &response) -> packet::error_type { |                 packet &response) -> packet::error_type { | ||||||
|            auto ret = STATUS_SUCCESS; |            auto ret = static_cast<packet::error_type>(STATUS_SUCCESS); | ||||||
|  |  | ||||||
|            HANDLE file_desc{}; |            HANDLE file_desc{}; | ||||||
|            DECODE_OR_RETURN(request, file_desc); |            DECODE_OR_RETURN(request, file_desc); | ||||||
| @@ -378,7 +378,7 @@ public: | |||||||
|          [this](std::uint32_t, const std::string &, std::uint64_t, |          [this](std::uint32_t, const std::string &, std::uint64_t, | ||||||
|                 const std::string &, packet *request, |                 const std::string &, packet *request, | ||||||
|                 packet &) -> packet::error_type { |                 packet &) -> packet::error_type { | ||||||
|            auto ret = STATUS_SUCCESS; |            auto ret = static_cast<packet::error_type>(STATUS_SUCCESS); | ||||||
|  |  | ||||||
|            HANDLE file_desc{}; |            HANDLE file_desc{}; | ||||||
|            DECODE_OR_RETURN(request, file_desc); |            DECODE_OR_RETURN(request, file_desc); | ||||||
| @@ -401,7 +401,7 @@ public: | |||||||
|          [this](std::uint32_t, const std::string &, std::uint64_t, |          [this](std::uint32_t, const std::string &, std::uint64_t, | ||||||
|                 const std::string &, packet *request, |                 const std::string &, packet *request, | ||||||
|                 packet &response) -> packet::error_type { |                 packet &response) -> packet::error_type { | ||||||
|            auto ret = STATUS_SUCCESS; |            auto ret = static_cast<packet::error_type>(STATUS_SUCCESS); | ||||||
|  |  | ||||||
|            HANDLE file_desc{}; |            HANDLE file_desc{}; | ||||||
|            DECODE_OR_RETURN(request, file_desc); |            DECODE_OR_RETURN(request, file_desc); | ||||||
| @@ -435,7 +435,7 @@ public: | |||||||
|          [this](std::uint32_t, const std::string &, std::uint64_t, |          [this](std::uint32_t, const std::string &, std::uint64_t, | ||||||
|                 const std::string &, packet *request, |                 const std::string &, packet *request, | ||||||
|                 packet &response) -> packet::error_type { |                 packet &response) -> packet::error_type { | ||||||
|            auto ret = STATUS_SUCCESS; |            auto ret = static_cast<packet::error_type>(STATUS_SUCCESS); | ||||||
|  |  | ||||||
|            HANDLE file_desc{}; |            HANDLE file_desc{}; | ||||||
|            DECODE_OR_RETURN(request, file_desc); |            DECODE_OR_RETURN(request, file_desc); | ||||||
| @@ -459,7 +459,7 @@ public: | |||||||
|          [this](std::uint32_t, const std::string &, std::uint64_t, |          [this](std::uint32_t, const std::string &, std::uint64_t, | ||||||
|                 const std::string &, packet *request, |                 const std::string &, packet *request, | ||||||
|                 packet &) -> packet::error_type { |                 packet &) -> packet::error_type { | ||||||
|            auto ret = STATUS_SUCCESS; |            auto ret = static_cast<packet::error_type>(STATUS_SUCCESS); | ||||||
|  |  | ||||||
|            std::wstring location; |            std::wstring location; | ||||||
|            DECODE_OR_RETURN(request, location); |            DECODE_OR_RETURN(request, location); | ||||||
| @@ -471,7 +471,7 @@ public: | |||||||
|          [this](std::uint32_t, const std::string &, std::uint64_t, |          [this](std::uint32_t, const std::string &, std::uint64_t, | ||||||
|                 const std::string &, packet *request, |                 const std::string &, packet *request, | ||||||
|                 packet &response) -> packet::error_type { |                 packet &response) -> packet::error_type { | ||||||
|            auto ret = STATUS_SUCCESS; |            auto ret = static_cast<packet::error_type>(STATUS_SUCCESS); | ||||||
|  |  | ||||||
|            HANDLE file_desc{}; |            HANDLE file_desc{}; | ||||||
|            DECODE_OR_RETURN(request, file_desc); |            DECODE_OR_RETURN(request, file_desc); | ||||||
|   | |||||||
| @@ -107,7 +107,7 @@ auto remote_server::populate_file_info(const std::string &api_path, | |||||||
|     return STATUS_SUCCESS; |     return STATUS_SUCCESS; | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   return STATUS_OBJECT_NAME_NOT_FOUND; |   return static_cast<packet::error_type>(STATUS_OBJECT_NAME_NOT_FOUND); | ||||||
| } | } | ||||||
|  |  | ||||||
| void remote_server::populate_file_info(const std::string &api_path, | void remote_server::populate_file_info(const std::string &api_path, | ||||||
| @@ -992,19 +992,19 @@ auto remote_server::winfsp_can_delete(PVOID file_desc, | |||||||
|  |  | ||||||
|   const auto relative_path = utils::string::to_utf8(file_name); |   const auto relative_path = utils::string::to_utf8(file_name); | ||||||
|   const auto file_path = construct_path(relative_path); |   const auto file_path = construct_path(relative_path); | ||||||
|   auto ret = |   auto ret = static_cast<packet::error_type>( | ||||||
|       has_open_info(static_cast<native_handle>( |       has_open_info(static_cast<native_handle>( | ||||||
|                         reinterpret_cast<remote::file_handle>(file_desc)), |                         reinterpret_cast<remote::file_handle>(file_desc)), | ||||||
|                     STATUS_INVALID_HANDLE); |                     STATUS_INVALID_HANDLE)); | ||||||
|   if (ret == STATUS_SUCCESS) { |   if (ret == STATUS_SUCCESS) { | ||||||
|     ret = |     ret = | ||||||
|         utils::file::is_directory(file_path) |         utils::file::is_directory(file_path) | ||||||
|             ? (drive_.get_directory_item_count( |             ? (drive_.get_directory_item_count( | ||||||
|                    utils::path::create_api_path(relative_path)) |                    utils::path::create_api_path(relative_path)) | ||||||
|                    ? STATUS_DIRECTORY_NOT_EMPTY |                    ? static_cast<packet::error_type>(STATUS_DIRECTORY_NOT_EMPTY) | ||||||
|                    : STATUS_SUCCESS) |                    : STATUS_SUCCESS) | ||||||
|             : (drive_.is_processing(utils::path::create_api_path(relative_path)) |             : (drive_.is_processing(utils::path::create_api_path(relative_path)) | ||||||
|                    ? STATUS_DEVICE_BUSY |                    ? static_cast<packet::error_type>(STATUS_DEVICE_BUSY) | ||||||
|                    : STATUS_SUCCESS); |                    : STATUS_SUCCESS); | ||||||
|   } |   } | ||||||
|  |  | ||||||
| @@ -1144,8 +1144,8 @@ auto remote_server::winfsp_flush(PVOID file_desc, remote::file_info *file_info) | |||||||
|   constexpr const auto *function_name = static_cast<const char *>(__FUNCTION__); |   constexpr const auto *function_name = static_cast<const char *>(__FUNCTION__); | ||||||
|  |  | ||||||
|   const auto handle = reinterpret_cast<remote::file_handle>(file_desc); |   const auto handle = reinterpret_cast<remote::file_handle>(file_desc); | ||||||
|   auto ret = |   auto ret = static_cast<packet::error_type>( | ||||||
|       has_open_info(static_cast<native_handle>(handle), STATUS_INVALID_HANDLE); |       has_open_info(static_cast<native_handle>(handle), STATUS_INVALID_HANDLE)); | ||||||
|   if (ret == STATUS_SUCCESS) { |   if (ret == STATUS_SUCCESS) { | ||||||
|     ret = (fsync(static_cast<native_handle>(handle)) < 0) |     ret = (fsync(static_cast<native_handle>(handle)) < 0) | ||||||
|               ? utils::unix_error_to_windows(errno) |               ? utils::unix_error_to_windows(errno) | ||||||
| @@ -1165,8 +1165,8 @@ auto remote_server::winfsp_get_file_info( | |||||||
|   constexpr const auto *function_name = static_cast<const char *>(__FUNCTION__); |   constexpr const auto *function_name = static_cast<const char *>(__FUNCTION__); | ||||||
|  |  | ||||||
|   const auto handle = reinterpret_cast<remote::file_handle>(file_desc); |   const auto handle = reinterpret_cast<remote::file_handle>(file_desc); | ||||||
|   auto ret = |   auto ret = static_cast<packet::error_type>( | ||||||
|       has_open_info(static_cast<native_handle>(handle), STATUS_INVALID_HANDLE); |       has_open_info(static_cast<native_handle>(handle), STATUS_INVALID_HANDLE)); | ||||||
|   if (ret == STATUS_SUCCESS) { |   if (ret == STATUS_SUCCESS) { | ||||||
|     ret = populate_file_info(construct_api_path(get_open_file_path( |     ret = populate_file_info(construct_api_path(get_open_file_path( | ||||||
|                                  static_cast<native_handle>(handle))), |                                  static_cast<native_handle>(handle))), | ||||||
| @@ -1185,7 +1185,7 @@ auto remote_server::winfsp_get_security_by_name( | |||||||
|     std::wstring & /*str_descriptor*/) -> packet::error_type { |     std::wstring & /*str_descriptor*/) -> packet::error_type { | ||||||
|   constexpr const auto *function_name = static_cast<const char *>(__FUNCTION__); |   constexpr const auto *function_name = static_cast<const char *>(__FUNCTION__); | ||||||
|  |  | ||||||
|   auto ret = STATUS_SUCCESS; |   auto ret = static_cast<packet::error_type>(STATUS_SUCCESS); | ||||||
|   const auto file_path = construct_path(file_name); |   const auto file_path = construct_path(file_name); | ||||||
|   if (utils::file::is_file(file_path) || |   if (utils::file::is_file(file_path) || | ||||||
|       (utils::file::is_directory(file_path))) { |       (utils::file::is_directory(file_path))) { | ||||||
| @@ -1197,7 +1197,7 @@ auto remote_server::winfsp_get_security_by_name( | |||||||
|       } |       } | ||||||
|     } |     } | ||||||
|   } else { |   } else { | ||||||
|     ret = STATUS_OBJECT_NAME_NOT_FOUND; |     ret = static_cast<packet::error_type>(STATUS_OBJECT_NAME_NOT_FOUND); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   RAISE_REMOTE_FUSE_SERVER_EVENT(function_name, construct_path(file_name), ret); |   RAISE_REMOTE_FUSE_SERVER_EVENT(function_name, construct_path(file_name), ret); | ||||||
| @@ -1268,8 +1268,8 @@ auto remote_server::winfsp_overwrite( | |||||||
|   constexpr const auto *function_name = static_cast<const char *>(__FUNCTION__); |   constexpr const auto *function_name = static_cast<const char *>(__FUNCTION__); | ||||||
|  |  | ||||||
|   const auto handle = reinterpret_cast<remote::file_handle>(file_desc); |   const auto handle = reinterpret_cast<remote::file_handle>(file_desc); | ||||||
|   auto ret = |   auto ret = static_cast<packet::error_type>( | ||||||
|       has_open_info(static_cast<native_handle>(handle), STATUS_INVALID_HANDLE); |       has_open_info(static_cast<native_handle>(handle), STATUS_INVALID_HANDLE)); | ||||||
|   if (ret == STATUS_SUCCESS) { |   if (ret == STATUS_SUCCESS) { | ||||||
|     const auto api_path = construct_api_path( |     const auto api_path = construct_api_path( | ||||||
|         get_open_file_path(static_cast<native_handle>(handle))); |         get_open_file_path(static_cast<native_handle>(handle))); | ||||||
| @@ -1325,8 +1325,8 @@ auto remote_server::winfsp_read(PVOID file_desc, PVOID buffer, UINT64 offset, | |||||||
|   *bytes_transferred = 0; |   *bytes_transferred = 0; | ||||||
|  |  | ||||||
|   const auto handle = reinterpret_cast<remote::file_handle>(file_desc); |   const auto handle = reinterpret_cast<remote::file_handle>(file_desc); | ||||||
|   auto ret = |   auto ret = static_cast<packet::error_type>( | ||||||
|       has_open_info(static_cast<native_handle>(handle), STATUS_INVALID_HANDLE); |       has_open_info(static_cast<native_handle>(handle), STATUS_INVALID_HANDLE)); | ||||||
|   if (ret == STATUS_SUCCESS) { |   if (ret == STATUS_SUCCESS) { | ||||||
|     const auto res = pread64(static_cast<native_handle>(handle), buffer, length, |     const auto res = pread64(static_cast<native_handle>(handle), buffer, length, | ||||||
|                              static_cast<off_t>(offset)); |                              static_cast<off_t>(offset)); | ||||||
| @@ -1351,8 +1351,8 @@ auto remote_server::winfsp_read_directory(PVOID file_desc, PWSTR /*pattern*/, | |||||||
|   item_list.clear(); |   item_list.clear(); | ||||||
|  |  | ||||||
|   const auto handle = reinterpret_cast<remote::file_handle>(file_desc); |   const auto handle = reinterpret_cast<remote::file_handle>(file_desc); | ||||||
|   auto ret = |   auto ret = static_cast<packet::error_type>( | ||||||
|       has_open_info(static_cast<native_handle>(handle), STATUS_INVALID_HANDLE); |       has_open_info(static_cast<native_handle>(handle), STATUS_INVALID_HANDLE)); | ||||||
|   if (ret == STATUS_SUCCESS) { |   if (ret == STATUS_SUCCESS) { | ||||||
|     const auto api_path = construct_api_path( |     const auto api_path = construct_api_path( | ||||||
|         get_open_file_path(static_cast<native_handle>(handle))); |         get_open_file_path(static_cast<native_handle>(handle))); | ||||||
| @@ -1413,8 +1413,8 @@ auto remote_server::winfsp_set_basic_info( | |||||||
|   constexpr const auto *function_name = static_cast<const char *>(__FUNCTION__); |   constexpr const auto *function_name = static_cast<const char *>(__FUNCTION__); | ||||||
|  |  | ||||||
|   const auto handle = reinterpret_cast<remote::file_handle>(file_desc); |   const auto handle = reinterpret_cast<remote::file_handle>(file_desc); | ||||||
|   auto ret = |   auto ret = static_cast<packet::error_type>( | ||||||
|       has_open_info(static_cast<native_handle>(handle), STATUS_INVALID_HANDLE); |       has_open_info(static_cast<native_handle>(handle), STATUS_INVALID_HANDLE)); | ||||||
|   if (ret == STATUS_SUCCESS) { |   if (ret == STATUS_SUCCESS) { | ||||||
|     const auto file_path = |     const auto file_path = | ||||||
|         get_open_file_path(static_cast<native_handle>(handle)); |         get_open_file_path(static_cast<native_handle>(handle)); | ||||||
| @@ -1476,8 +1476,8 @@ auto remote_server::winfsp_set_file_size( | |||||||
|   constexpr const auto *function_name = static_cast<const char *>(__FUNCTION__); |   constexpr const auto *function_name = static_cast<const char *>(__FUNCTION__); | ||||||
|  |  | ||||||
|   const auto handle = reinterpret_cast<remote::file_handle>(file_desc); |   const auto handle = reinterpret_cast<remote::file_handle>(file_desc); | ||||||
|   auto ret = |   auto ret = static_cast<packet::error_type>( | ||||||
|       has_open_info(static_cast<native_handle>(handle), STATUS_INVALID_HANDLE); |       has_open_info(static_cast<native_handle>(handle), STATUS_INVALID_HANDLE)); | ||||||
|   if (ret == STATUS_SUCCESS) { |   if (ret == STATUS_SUCCESS) { | ||||||
|     const auto res = set_allocation_size == 0U |     const auto res = set_allocation_size == 0U | ||||||
|                          ? ftruncate(static_cast<native_handle>(handle), |                          ? ftruncate(static_cast<native_handle>(handle), | ||||||
| @@ -1514,8 +1514,8 @@ auto remote_server::winfsp_write( | |||||||
|  |  | ||||||
|   *bytes_transferred = 0; |   *bytes_transferred = 0; | ||||||
|   const auto handle = reinterpret_cast<remote::file_handle>(file_desc); |   const auto handle = reinterpret_cast<remote::file_handle>(file_desc); | ||||||
|   auto ret = |   auto ret = static_cast<packet::error_type>( | ||||||
|       has_open_info(static_cast<native_handle>(handle), STATUS_INVALID_HANDLE); |       has_open_info(static_cast<native_handle>(handle), STATUS_INVALID_HANDLE)); | ||||||
|   if (ret == STATUS_SUCCESS) { |   if (ret == STATUS_SUCCESS) { | ||||||
|     const auto api_path = construct_api_path( |     const auto api_path = construct_api_path( | ||||||
|         get_open_file_path(static_cast<native_handle>(handle))); |         get_open_file_path(static_cast<native_handle>(handle))); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user