diff options
| author | 2024-02-19 19:22:51 +0100 | |
|---|---|---|
| committer | 2024-02-19 19:22:51 +0100 | |
| commit | ef5027712413705802d10c797b0f0b66375a9f58 (patch) | |
| tree | 979cf4d365ca5d7f0e63abdd3ecf476f93d4b21b /src/core/hle/service/filesystem | |
| parent | Address review comments (diff) | |
| download | yuzu-ef5027712413705802d10c797b0f0b66375a9f58.tar.gz yuzu-ef5027712413705802d10c797b0f0b66375a9f58.tar.xz yuzu-ef5027712413705802d10c797b0f0b66375a9f58.zip | |
Address review comments pt. 2
Diffstat (limited to 'src/core/hle/service/filesystem')
| -rw-r--r-- | src/core/hle/service/filesystem/fsp/fs_i_filesystem.cpp | 4 | ||||
| -rw-r--r-- | src/core/hle/service/filesystem/fsp/fs_i_filesystem.h | 28 |
2 files changed, 4 insertions, 28 deletions
diff --git a/src/core/hle/service/filesystem/fsp/fs_i_filesystem.cpp b/src/core/hle/service/filesystem/fsp/fs_i_filesystem.cpp index 86dd5b7e9..d881e144d 100644 --- a/src/core/hle/service/filesystem/fsp/fs_i_filesystem.cpp +++ b/src/core/hle/service/filesystem/fsp/fs_i_filesystem.cpp | |||
| @@ -157,10 +157,10 @@ Result IFileSystem::GetFileTimeStampRaw( | |||
| 157 | R_SUCCEED(); | 157 | R_SUCCEED(); |
| 158 | } | 158 | } |
| 159 | 159 | ||
| 160 | Result IFileSystem::GetFileSystemAttribute(Out<FileSystemAttribute> out_attribute) { | 160 | Result IFileSystem::GetFileSystemAttribute(Out<FileSys::FileSystemAttribute> out_attribute) { |
| 161 | LOG_WARNING(Service_FS, "(STUBBED) called"); | 161 | LOG_WARNING(Service_FS, "(STUBBED) called"); |
| 162 | 162 | ||
| 163 | FileSystemAttribute savedata_attribute{}; | 163 | FileSys::FileSystemAttribute savedata_attribute{}; |
| 164 | savedata_attribute.dir_entry_name_length_max_defined = true; | 164 | savedata_attribute.dir_entry_name_length_max_defined = true; |
| 165 | savedata_attribute.file_entry_name_length_max_defined = true; | 165 | savedata_attribute.file_entry_name_length_max_defined = true; |
| 166 | savedata_attribute.dir_entry_name_length_max = 0x40; | 166 | savedata_attribute.dir_entry_name_length_max = 0x40; |
diff --git a/src/core/hle/service/filesystem/fsp/fs_i_filesystem.h b/src/core/hle/service/filesystem/fsp/fs_i_filesystem.h index 230ab8d71..113369203 100644 --- a/src/core/hle/service/filesystem/fsp/fs_i_filesystem.h +++ b/src/core/hle/service/filesystem/fsp/fs_i_filesystem.h | |||
| @@ -4,6 +4,7 @@ | |||
| 4 | #pragma once | 4 | #pragma once |
| 5 | 5 | ||
| 6 | #include "common/common_funcs.h" | 6 | #include "common/common_funcs.h" |
| 7 | #include "core/file_sys/fs_filesystem.h" | ||
| 7 | #include "core/file_sys/fsa/fs_i_filesystem.h" | 8 | #include "core/file_sys/fsa/fs_i_filesystem.h" |
| 8 | #include "core/file_sys/vfs/vfs.h" | 9 | #include "core/file_sys/vfs/vfs.h" |
| 9 | #include "core/hle/service/cmif_types.h" | 10 | #include "core/hle/service/cmif_types.h" |
| @@ -24,31 +25,6 @@ class IFileSystem final : public ServiceFramework<IFileSystem> { | |||
| 24 | public: | 25 | public: |
| 25 | explicit IFileSystem(Core::System& system_, FileSys::VirtualDir dir_, SizeGetter size_getter_); | 26 | explicit IFileSystem(Core::System& system_, FileSys::VirtualDir dir_, SizeGetter size_getter_); |
| 26 | 27 | ||
| 27 | struct FileSystemAttribute { | ||
| 28 | u8 dir_entry_name_length_max_defined; | ||
| 29 | u8 file_entry_name_length_max_defined; | ||
| 30 | u8 dir_path_name_length_max_defined; | ||
| 31 | u8 file_path_name_length_max_defined; | ||
| 32 | INSERT_PADDING_BYTES_NOINIT(0x5); | ||
| 33 | u8 utf16_dir_entry_name_length_max_defined; | ||
| 34 | u8 utf16_file_entry_name_length_max_defined; | ||
| 35 | u8 utf16_dir_path_name_length_max_defined; | ||
| 36 | u8 utf16_file_path_name_length_max_defined; | ||
| 37 | INSERT_PADDING_BYTES_NOINIT(0x18); | ||
| 38 | s32 dir_entry_name_length_max; | ||
| 39 | s32 file_entry_name_length_max; | ||
| 40 | s32 dir_path_name_length_max; | ||
| 41 | s32 file_path_name_length_max; | ||
| 42 | INSERT_PADDING_WORDS_NOINIT(0x5); | ||
| 43 | s32 utf16_dir_entry_name_length_max; | ||
| 44 | s32 utf16_file_entry_name_length_max; | ||
| 45 | s32 utf16_dir_path_name_length_max; | ||
| 46 | s32 utf16_file_path_name_length_max; | ||
| 47 | INSERT_PADDING_WORDS_NOINIT(0x18); | ||
| 48 | INSERT_PADDING_WORDS_NOINIT(0x1); | ||
| 49 | }; | ||
| 50 | static_assert(sizeof(FileSystemAttribute) == 0xC0, "FileSystemAttribute has incorrect size"); | ||
| 51 | |||
| 52 | Result CreateFile(const InLargeData<FileSys::Sf::Path, BufferAttr_HipcPointer> path, s32 option, | 28 | Result CreateFile(const InLargeData<FileSys::Sf::Path, BufferAttr_HipcPointer> path, s32 option, |
| 53 | s64 size); | 29 | s64 size); |
| 54 | Result DeleteFile(const InLargeData<FileSys::Sf::Path, BufferAttr_HipcPointer> path); | 30 | Result DeleteFile(const InLargeData<FileSys::Sf::Path, BufferAttr_HipcPointer> path); |
| @@ -74,7 +50,7 @@ public: | |||
| 74 | const InLargeData<FileSys::Sf::Path, BufferAttr_HipcPointer> path); | 50 | const InLargeData<FileSys::Sf::Path, BufferAttr_HipcPointer> path); |
| 75 | Result GetFileTimeStampRaw(Out<FileSys::FileTimeStampRaw> out_timestamp, | 51 | Result GetFileTimeStampRaw(Out<FileSys::FileTimeStampRaw> out_timestamp, |
| 76 | const InLargeData<FileSys::Sf::Path, BufferAttr_HipcPointer> path); | 52 | const InLargeData<FileSys::Sf::Path, BufferAttr_HipcPointer> path); |
| 77 | Result GetFileSystemAttribute(Out<FileSystemAttribute> out_attribute); | 53 | Result GetFileSystemAttribute(Out<FileSys::FileSystemAttribute> out_attribute); |
| 78 | 54 | ||
| 79 | private: | 55 | private: |
| 80 | std::unique_ptr<FileSys::Fsa::IFileSystem> backend; | 56 | std::unique_ptr<FileSys::Fsa::IFileSystem> backend; |