From 5fc1981061495cfa8816a444f334e45d730d4572 Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Fri, 12 Feb 2021 02:30:52 -0800 Subject: [PATCH] htc: fix htcfs sf definition --- .../include/stratosphere/tma/tma_i_file_manager.hpp | 12 ++++++------ .../libstratosphere/source/htcfs/htcfs_client.hpp | 2 +- .../htcfs/htcfs_file_system_service_object.cpp | 6 +++--- .../htcfs/htcfs_file_system_service_object.hpp | 6 +++--- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/libraries/libstratosphere/include/stratosphere/tma/tma_i_file_manager.hpp b/libraries/libstratosphere/include/stratosphere/tma/tma_i_file_manager.hpp index 6bd0190cf..2d5ed669c 100644 --- a/libraries/libstratosphere/include/stratosphere/tma/tma_i_file_manager.hpp +++ b/libraries/libstratosphere/include/stratosphere/tma/tma_i_file_manager.hpp @@ -21,15 +21,15 @@ /* NOTE: Minimum firmware version not enforced for any commands. */ #define AMS_TMA_I_FILE_MANAGER_INTERFACE_INFO(C, H) \ - AMS_SF_METHOD_INFO(C, H, 0, Result, OpenFile, (sf::Out> out, const tma::Path &path, bool case_sensitive), (out, path, case_sensitive)) \ + AMS_SF_METHOD_INFO(C, H, 0, Result, OpenFile, (sf::Out> out, const tma::Path &path, u32 open_mode, bool case_sensitive), (out, path, open_mode, case_sensitive)) \ AMS_SF_METHOD_INFO(C, H, 1, Result, FileExists, (sf::Out out, const tma::Path &path, bool case_sensitive), (out, path, case_sensitive)) \ AMS_SF_METHOD_INFO(C, H, 2, Result, DeleteFile, (const tma::Path &path, bool case_sensitive), (path, case_sensitive)) \ AMS_SF_METHOD_INFO(C, H, 3, Result, RenameFile, (const tma::Path &old_path, const tma::Path &new_path, bool case_sensitive), (old_path, new_path, case_sensitive)) \ AMS_SF_METHOD_INFO(C, H, 4, Result, GetIOType, (sf::Out out, const tma::Path &path, bool case_sensitive), (out, path, case_sensitive)) \ - AMS_SF_METHOD_INFO(C, H, 5, Result, OpenDirectory, (sf::Out> out, const tma::Path &path, bool case_sensitive), (out, path, case_sensitive)) \ + AMS_SF_METHOD_INFO(C, H, 5, Result, OpenDirectory, (sf::Out> out, const tma::Path &path, s32 open_mode, bool case_sensitive), (out, path, open_mode, case_sensitive)) \ AMS_SF_METHOD_INFO(C, H, 6, Result, DirectoryExists, (sf::Out out, const tma::Path &path, bool case_sensitive), (out, path, case_sensitive)) \ AMS_SF_METHOD_INFO(C, H, 7, Result, CreateDirectory, (const tma::Path &path, bool case_sensitive), (path, case_sensitive)) \ - AMS_SF_METHOD_INFO(C, H, 8, Result, DeleteDirectory, (const tma::Path &path, bool case_sensitive), (path, case_sensitive)) \ + AMS_SF_METHOD_INFO(C, H, 8, Result, DeleteDirectory, (const tma::Path &path, bool recursively, bool case_sensitive), (path, recursively, case_sensitive)) \ AMS_SF_METHOD_INFO(C, H, 9, Result, RenameDirectory, (const tma::Path &old_path, const tma::Path &new_path, bool case_sensitive), (old_path, new_path, case_sensitive)) \ AMS_SF_METHOD_INFO(C, H, 10, Result, CreateFile, (const tma::Path &path, s64 size, bool case_sensitive), (path, size, case_sensitive)) \ AMS_SF_METHOD_INFO(C, H, 11, Result, GetFileTimeStamp, (sf::Out out_create, sf::Out out_access, sf::Out out_modify, const tma::Path &path, bool case_sensitive), (out_create, out_access, out_modify, path, case_sensitive)) \ @@ -40,15 +40,15 @@ AMS_SF_DEFINE_INTERFACE(ams::tma, IFileManager, AMS_TMA_I_FILE_MANAGER_INTERFACE /* Prior to system version 6.0.0, case sensitivity was not parameterized. */ #define AMS_TMA_I_DEPRECATED_FILE_MANAGER_INTERFACE_INFO(C, H) \ - AMS_SF_METHOD_INFO(C, H, 0, Result, OpenFile, (sf::Out> out, const tma::Path &path), (out, path)) \ + AMS_SF_METHOD_INFO(C, H, 0, Result, OpenFile, (sf::Out> out, const tma::Path &path, u32 open_mode), (out, path, open_mode)) \ AMS_SF_METHOD_INFO(C, H, 1, Result, FileExists, (sf::Out out, const tma::Path &path), (out, path)) \ AMS_SF_METHOD_INFO(C, H, 2, Result, DeleteFile, (const tma::Path &path), (path)) \ AMS_SF_METHOD_INFO(C, H, 3, Result, RenameFile, (const tma::Path &old_path, const tma::Path &new_path), (old_path, new_path)) \ AMS_SF_METHOD_INFO(C, H, 4, Result, GetIOType, (sf::Out out, const tma::Path &path), (out, path)) \ - AMS_SF_METHOD_INFO(C, H, 5, Result, OpenDirectory, (sf::Out> out, const tma::Path &path), (out, path)) \ + AMS_SF_METHOD_INFO(C, H, 5, Result, OpenDirectory, (sf::Out> out, const tma::Path &path, s32 open_mode), (out, path, open_mode)) \ AMS_SF_METHOD_INFO(C, H, 6, Result, DirectoryExists, (sf::Out out, const tma::Path &path), (out, path)) \ AMS_SF_METHOD_INFO(C, H, 7, Result, CreateDirectory, (const tma::Path &path), (path)) \ - AMS_SF_METHOD_INFO(C, H, 8, Result, DeleteDirectory, (const tma::Path &path), (path)) \ + AMS_SF_METHOD_INFO(C, H, 8, Result, DeleteDirectory, (const tma::Path &path, bool recursively), (path, recursively)) \ AMS_SF_METHOD_INFO(C, H, 9, Result, RenameDirectory, (const tma::Path &old_path, const tma::Path &new_path), (old_path, new_path)) \ AMS_SF_METHOD_INFO(C, H, 10, Result, CreateFile, (const tma::Path &path, s64 size), (path, size)) \ AMS_SF_METHOD_INFO(C, H, 11, Result, GetFileTimeStamp, (sf::Out out_create, sf::Out out_access, sf::Out out_modify, const tma::Path &path), (out_create, out_access, out_modify, path)) \ diff --git a/libraries/libstratosphere/source/htcfs/htcfs_client.hpp b/libraries/libstratosphere/source/htcfs/htcfs_client.hpp index 974342703..0b3da3889 100644 --- a/libraries/libstratosphere/source/htcfs/htcfs_client.hpp +++ b/libraries/libstratosphere/source/htcfs/htcfs_client.hpp @@ -23,7 +23,7 @@ namespace ams::htcfs { private: ClientImpl m_impl; public: - Client(htclow::HtclowManager *manager); + Client(htclow::HtclowManager *manager) : m_impl(manager) { /* ... */ } }; void InitializeClient(htclow::HtclowManager *manager); diff --git a/libraries/libstratosphere/source/htcfs/htcfs_file_system_service_object.cpp b/libraries/libstratosphere/source/htcfs/htcfs_file_system_service_object.cpp index e1e75af0d..353845c5b 100644 --- a/libraries/libstratosphere/source/htcfs/htcfs_file_system_service_object.cpp +++ b/libraries/libstratosphere/source/htcfs/htcfs_file_system_service_object.cpp @@ -18,7 +18,7 @@ namespace ams::htcfs { - Result FileSystemServiceObject::OpenFile(sf::Out> out, const tma::Path &path, bool case_sensitive) { + Result FileSystemServiceObject::OpenFile(sf::Out> out, const tma::Path &path, u32 open_mode, bool case_sensitive) { AMS_ABORT("FileSystemServiceObject::OpenFile"); } @@ -38,7 +38,7 @@ namespace ams::htcfs { AMS_ABORT("FileSystemServiceObject::GetIOType"); } - Result FileSystemServiceObject::OpenDirectory(sf::Out> out, const tma::Path &path, bool case_sensitive) { + Result FileSystemServiceObject::OpenDirectory(sf::Out> out, const tma::Path &path, s32 open_mode, bool case_sensitive) { AMS_ABORT("FileSystemServiceObject::OpenDirectory"); } @@ -50,7 +50,7 @@ namespace ams::htcfs { AMS_ABORT("FileSystemServiceObject::CreateDirectory"); } - Result FileSystemServiceObject::DeleteDirectory(const tma::Path &path, bool case_sensitive) { + Result FileSystemServiceObject::DeleteDirectory(const tma::Path &path, bool recursively, bool case_sensitive) { AMS_ABORT("FileSystemServiceObject::DeleteDirectory"); } diff --git a/libraries/libstratosphere/source/htcfs/htcfs_file_system_service_object.hpp b/libraries/libstratosphere/source/htcfs/htcfs_file_system_service_object.hpp index 8c1546aa2..3f7bb366f 100644 --- a/libraries/libstratosphere/source/htcfs/htcfs_file_system_service_object.hpp +++ b/libraries/libstratosphere/source/htcfs/htcfs_file_system_service_object.hpp @@ -22,15 +22,15 @@ namespace ams::htcfs { class FileSystemServiceObject { public: - Result OpenFile(sf::Out> out, const tma::Path &path, bool case_sensitive = DefaultCaseSensitivityForDeprecatedFileSystemServiceObject); + Result OpenFile(sf::Out> out, const tma::Path &path, u32 open_mode, bool case_sensitive = DefaultCaseSensitivityForDeprecatedFileSystemServiceObject); Result FileExists(sf::Out out, const tma::Path &path, bool case_sensitive = DefaultCaseSensitivityForDeprecatedFileSystemServiceObject); Result DeleteFile(const tma::Path &path, bool case_sensitive = DefaultCaseSensitivityForDeprecatedFileSystemServiceObject); Result RenameFile(const tma::Path &old_path, const tma::Path &new_path, bool case_sensitive = DefaultCaseSensitivityForDeprecatedFileSystemServiceObject); Result GetIOType(sf::Out out, const tma::Path &path, bool case_sensitive = DefaultCaseSensitivityForDeprecatedFileSystemServiceObject); - Result OpenDirectory(sf::Out> out, const tma::Path &path, bool case_sensitive = DefaultCaseSensitivityForDeprecatedFileSystemServiceObject); + Result OpenDirectory(sf::Out> out, const tma::Path &path, s32 open_mode, bool case_sensitive = DefaultCaseSensitivityForDeprecatedFileSystemServiceObject); Result DirectoryExists(sf::Out out, const tma::Path &path, bool case_sensitive = DefaultCaseSensitivityForDeprecatedFileSystemServiceObject); Result CreateDirectory(const tma::Path &path, bool case_sensitive = DefaultCaseSensitivityForDeprecatedFileSystemServiceObject); - Result DeleteDirectory(const tma::Path &path, bool case_sensitive = DefaultCaseSensitivityForDeprecatedFileSystemServiceObject); + Result DeleteDirectory(const tma::Path &path, bool recursively, bool case_sensitive = DefaultCaseSensitivityForDeprecatedFileSystemServiceObject); Result RenameDirectory(const tma::Path &old_path, const tma::Path &new_path, bool case_sensitive = DefaultCaseSensitivityForDeprecatedFileSystemServiceObject); Result CreateFile(const tma::Path &path, s64 size, bool case_sensitive = DefaultCaseSensitivityForDeprecatedFileSystemServiceObject); Result GetFileTimeStamp(sf::Out out_create, sf::Out out_access, sf::Out out_modify, const tma::Path &path, bool case_sensitive = DefaultCaseSensitivityForDeprecatedFileSystemServiceObject);