diff options
| author | 2023-02-19 14:42:12 -0500 | |
|---|---|---|
| committer | 2023-03-01 10:39:49 -0500 | |
| commit | 65be230fdda302b25447f2f09b06e3238bd09e79 (patch) | |
| tree | 68250d7bc8151041b236dcd79483df98938952cd /src/core/hle/service/filesystem | |
| parent | sm:: remove unused member (diff) | |
| download | yuzu-65be230fdda302b25447f2f09b06e3238bd09e79.tar.gz yuzu-65be230fdda302b25447f2f09b06e3238bd09e79.tar.xz yuzu-65be230fdda302b25447f2f09b06e3238bd09e79.zip | |
service: move hle_ipc from kernel
Diffstat (limited to 'src/core/hle/service/filesystem')
| -rw-r--r-- | src/core/hle/service/filesystem/fsp_srv.cpp | 95 | ||||
| -rw-r--r-- | src/core/hle/service/filesystem/fsp_srv.h | 40 |
2 files changed, 67 insertions, 68 deletions
diff --git a/src/core/hle/service/filesystem/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp_srv.cpp index 89eddb510..9e559d97e 100644 --- a/src/core/hle/service/filesystem/fsp_srv.cpp +++ b/src/core/hle/service/filesystem/fsp_srv.cpp | |||
| @@ -24,9 +24,9 @@ | |||
| 24 | #include "core/file_sys/savedata_factory.h" | 24 | #include "core/file_sys/savedata_factory.h" |
| 25 | #include "core/file_sys/system_archive/system_archive.h" | 25 | #include "core/file_sys/system_archive/system_archive.h" |
| 26 | #include "core/file_sys/vfs.h" | 26 | #include "core/file_sys/vfs.h" |
| 27 | #include "core/hle/ipc_helpers.h" | ||
| 28 | #include "core/hle/service/filesystem/filesystem.h" | 27 | #include "core/hle/service/filesystem/filesystem.h" |
| 29 | #include "core/hle/service/filesystem/fsp_srv.h" | 28 | #include "core/hle/service/filesystem/fsp_srv.h" |
| 29 | #include "core/hle/service/ipc_helpers.h" | ||
| 30 | #include "core/reporter.h" | 30 | #include "core/reporter.h" |
| 31 | 31 | ||
| 32 | namespace Service::FileSystem { | 32 | namespace Service::FileSystem { |
| @@ -72,7 +72,7 @@ public: | |||
| 72 | private: | 72 | private: |
| 73 | FileSys::VirtualFile backend; | 73 | FileSys::VirtualFile backend; |
| 74 | 74 | ||
| 75 | void Read(Kernel::HLERequestContext& ctx) { | 75 | void Read(HLERequestContext& ctx) { |
| 76 | IPC::RequestParser rp{ctx}; | 76 | IPC::RequestParser rp{ctx}; |
| 77 | const s64 offset = rp.Pop<s64>(); | 77 | const s64 offset = rp.Pop<s64>(); |
| 78 | const s64 length = rp.Pop<s64>(); | 78 | const s64 length = rp.Pop<s64>(); |
| @@ -102,7 +102,7 @@ private: | |||
| 102 | rb.Push(ResultSuccess); | 102 | rb.Push(ResultSuccess); |
| 103 | } | 103 | } |
| 104 | 104 | ||
| 105 | void GetSize(Kernel::HLERequestContext& ctx) { | 105 | void GetSize(HLERequestContext& ctx) { |
| 106 | const u64 size = backend->GetSize(); | 106 | const u64 size = backend->GetSize(); |
| 107 | LOG_DEBUG(Service_FS, "called, size={}", size); | 107 | LOG_DEBUG(Service_FS, "called, size={}", size); |
| 108 | 108 | ||
| @@ -131,7 +131,7 @@ public: | |||
| 131 | private: | 131 | private: |
| 132 | FileSys::VirtualFile backend; | 132 | FileSys::VirtualFile backend; |
| 133 | 133 | ||
| 134 | void Read(Kernel::HLERequestContext& ctx) { | 134 | void Read(HLERequestContext& ctx) { |
| 135 | IPC::RequestParser rp{ctx}; | 135 | IPC::RequestParser rp{ctx}; |
| 136 | const u64 option = rp.Pop<u64>(); | 136 | const u64 option = rp.Pop<u64>(); |
| 137 | const s64 offset = rp.Pop<s64>(); | 137 | const s64 offset = rp.Pop<s64>(); |
| @@ -165,7 +165,7 @@ private: | |||
| 165 | rb.Push(static_cast<u64>(output.size())); | 165 | rb.Push(static_cast<u64>(output.size())); |
| 166 | } | 166 | } |
| 167 | 167 | ||
| 168 | void Write(Kernel::HLERequestContext& ctx) { | 168 | void Write(HLERequestContext& ctx) { |
| 169 | IPC::RequestParser rp{ctx}; | 169 | IPC::RequestParser rp{ctx}; |
| 170 | const u64 option = rp.Pop<u64>(); | 170 | const u64 option = rp.Pop<u64>(); |
| 171 | const s64 offset = rp.Pop<s64>(); | 171 | const s64 offset = rp.Pop<s64>(); |
| @@ -208,7 +208,7 @@ private: | |||
| 208 | rb.Push(ResultSuccess); | 208 | rb.Push(ResultSuccess); |
| 209 | } | 209 | } |
| 210 | 210 | ||
| 211 | void Flush(Kernel::HLERequestContext& ctx) { | 211 | void Flush(HLERequestContext& ctx) { |
| 212 | LOG_DEBUG(Service_FS, "called"); | 212 | LOG_DEBUG(Service_FS, "called"); |
| 213 | 213 | ||
| 214 | // Exists for SDK compatibiltity -- No need to flush file. | 214 | // Exists for SDK compatibiltity -- No need to flush file. |
| @@ -217,7 +217,7 @@ private: | |||
| 217 | rb.Push(ResultSuccess); | 217 | rb.Push(ResultSuccess); |
| 218 | } | 218 | } |
| 219 | 219 | ||
| 220 | void SetSize(Kernel::HLERequestContext& ctx) { | 220 | void SetSize(HLERequestContext& ctx) { |
| 221 | IPC::RequestParser rp{ctx}; | 221 | IPC::RequestParser rp{ctx}; |
| 222 | const u64 size = rp.Pop<u64>(); | 222 | const u64 size = rp.Pop<u64>(); |
| 223 | LOG_DEBUG(Service_FS, "called, size={}", size); | 223 | LOG_DEBUG(Service_FS, "called, size={}", size); |
| @@ -228,7 +228,7 @@ private: | |||
| 228 | rb.Push(ResultSuccess); | 228 | rb.Push(ResultSuccess); |
| 229 | } | 229 | } |
| 230 | 230 | ||
| 231 | void GetSize(Kernel::HLERequestContext& ctx) { | 231 | void GetSize(HLERequestContext& ctx) { |
| 232 | const u64 size = backend->GetSize(); | 232 | const u64 size = backend->GetSize(); |
| 233 | LOG_DEBUG(Service_FS, "called, size={}", size); | 233 | LOG_DEBUG(Service_FS, "called, size={}", size); |
| 234 | 234 | ||
| @@ -270,7 +270,7 @@ private: | |||
| 270 | std::vector<FileSys::Entry> entries; | 270 | std::vector<FileSys::Entry> entries; |
| 271 | u64 next_entry_index = 0; | 271 | u64 next_entry_index = 0; |
| 272 | 272 | ||
| 273 | void Read(Kernel::HLERequestContext& ctx) { | 273 | void Read(HLERequestContext& ctx) { |
| 274 | LOG_DEBUG(Service_FS, "called."); | 274 | LOG_DEBUG(Service_FS, "called."); |
| 275 | 275 | ||
| 276 | // Calculate how many entries we can fit in the output buffer | 276 | // Calculate how many entries we can fit in the output buffer |
| @@ -294,7 +294,7 @@ private: | |||
| 294 | rb.Push(actual_entries); | 294 | rb.Push(actual_entries); |
| 295 | } | 295 | } |
| 296 | 296 | ||
| 297 | void GetEntryCount(Kernel::HLERequestContext& ctx) { | 297 | void GetEntryCount(HLERequestContext& ctx) { |
| 298 | LOG_DEBUG(Service_FS, "called"); | 298 | LOG_DEBUG(Service_FS, "called"); |
| 299 | 299 | ||
| 300 | u64 count = entries.size() - next_entry_index; | 300 | u64 count = entries.size() - next_entry_index; |
| @@ -331,7 +331,7 @@ public: | |||
| 331 | RegisterHandlers(functions); | 331 | RegisterHandlers(functions); |
| 332 | } | 332 | } |
| 333 | 333 | ||
| 334 | void CreateFile(Kernel::HLERequestContext& ctx) { | 334 | void CreateFile(HLERequestContext& ctx) { |
| 335 | IPC::RequestParser rp{ctx}; | 335 | IPC::RequestParser rp{ctx}; |
| 336 | 336 | ||
| 337 | const auto file_buffer = ctx.ReadBuffer(); | 337 | const auto file_buffer = ctx.ReadBuffer(); |
| @@ -347,7 +347,7 @@ public: | |||
| 347 | rb.Push(backend.CreateFile(name, file_size)); | 347 | rb.Push(backend.CreateFile(name, file_size)); |
| 348 | } | 348 | } |
| 349 | 349 | ||
| 350 | void DeleteFile(Kernel::HLERequestContext& ctx) { | 350 | void DeleteFile(HLERequestContext& ctx) { |
| 351 | const auto file_buffer = ctx.ReadBuffer(); | 351 | const auto file_buffer = ctx.ReadBuffer(); |
| 352 | const std::string name = Common::StringFromBuffer(file_buffer); | 352 | const std::string name = Common::StringFromBuffer(file_buffer); |
| 353 | 353 | ||
| @@ -357,7 +357,7 @@ public: | |||
| 357 | rb.Push(backend.DeleteFile(name)); | 357 | rb.Push(backend.DeleteFile(name)); |
| 358 | } | 358 | } |
| 359 | 359 | ||
| 360 | void CreateDirectory(Kernel::HLERequestContext& ctx) { | 360 | void CreateDirectory(HLERequestContext& ctx) { |
| 361 | const auto file_buffer = ctx.ReadBuffer(); | 361 | const auto file_buffer = ctx.ReadBuffer(); |
| 362 | const std::string name = Common::StringFromBuffer(file_buffer); | 362 | const std::string name = Common::StringFromBuffer(file_buffer); |
| 363 | 363 | ||
| @@ -367,7 +367,7 @@ public: | |||
| 367 | rb.Push(backend.CreateDirectory(name)); | 367 | rb.Push(backend.CreateDirectory(name)); |
| 368 | } | 368 | } |
| 369 | 369 | ||
| 370 | void DeleteDirectory(Kernel::HLERequestContext& ctx) { | 370 | void DeleteDirectory(HLERequestContext& ctx) { |
| 371 | const auto file_buffer = ctx.ReadBuffer(); | 371 | const auto file_buffer = ctx.ReadBuffer(); |
| 372 | const std::string name = Common::StringFromBuffer(file_buffer); | 372 | const std::string name = Common::StringFromBuffer(file_buffer); |
| 373 | 373 | ||
| @@ -377,7 +377,7 @@ public: | |||
| 377 | rb.Push(backend.DeleteDirectory(name)); | 377 | rb.Push(backend.DeleteDirectory(name)); |
| 378 | } | 378 | } |
| 379 | 379 | ||
| 380 | void DeleteDirectoryRecursively(Kernel::HLERequestContext& ctx) { | 380 | void DeleteDirectoryRecursively(HLERequestContext& ctx) { |
| 381 | const auto file_buffer = ctx.ReadBuffer(); | 381 | const auto file_buffer = ctx.ReadBuffer(); |
| 382 | const std::string name = Common::StringFromBuffer(file_buffer); | 382 | const std::string name = Common::StringFromBuffer(file_buffer); |
| 383 | 383 | ||
| @@ -387,7 +387,7 @@ public: | |||
| 387 | rb.Push(backend.DeleteDirectoryRecursively(name)); | 387 | rb.Push(backend.DeleteDirectoryRecursively(name)); |
| 388 | } | 388 | } |
| 389 | 389 | ||
| 390 | void CleanDirectoryRecursively(Kernel::HLERequestContext& ctx) { | 390 | void CleanDirectoryRecursively(HLERequestContext& ctx) { |
| 391 | const auto file_buffer = ctx.ReadBuffer(); | 391 | const auto file_buffer = ctx.ReadBuffer(); |
| 392 | const std::string name = Common::StringFromBuffer(file_buffer); | 392 | const std::string name = Common::StringFromBuffer(file_buffer); |
| 393 | 393 | ||
| @@ -397,7 +397,7 @@ public: | |||
| 397 | rb.Push(backend.CleanDirectoryRecursively(name)); | 397 | rb.Push(backend.CleanDirectoryRecursively(name)); |
| 398 | } | 398 | } |
| 399 | 399 | ||
| 400 | void RenameFile(Kernel::HLERequestContext& ctx) { | 400 | void RenameFile(HLERequestContext& ctx) { |
| 401 | const std::string src_name = Common::StringFromBuffer(ctx.ReadBuffer(0)); | 401 | const std::string src_name = Common::StringFromBuffer(ctx.ReadBuffer(0)); |
| 402 | const std::string dst_name = Common::StringFromBuffer(ctx.ReadBuffer(1)); | 402 | const std::string dst_name = Common::StringFromBuffer(ctx.ReadBuffer(1)); |
| 403 | 403 | ||
| @@ -407,7 +407,7 @@ public: | |||
| 407 | rb.Push(backend.RenameFile(src_name, dst_name)); | 407 | rb.Push(backend.RenameFile(src_name, dst_name)); |
| 408 | } | 408 | } |
| 409 | 409 | ||
| 410 | void OpenFile(Kernel::HLERequestContext& ctx) { | 410 | void OpenFile(HLERequestContext& ctx) { |
| 411 | IPC::RequestParser rp{ctx}; | 411 | IPC::RequestParser rp{ctx}; |
| 412 | 412 | ||
| 413 | const auto file_buffer = ctx.ReadBuffer(); | 413 | const auto file_buffer = ctx.ReadBuffer(); |
| @@ -431,7 +431,7 @@ public: | |||
| 431 | rb.PushIpcInterface<IFile>(std::move(file)); | 431 | rb.PushIpcInterface<IFile>(std::move(file)); |
| 432 | } | 432 | } |
| 433 | 433 | ||
| 434 | void OpenDirectory(Kernel::HLERequestContext& ctx) { | 434 | void OpenDirectory(HLERequestContext& ctx) { |
| 435 | IPC::RequestParser rp{ctx}; | 435 | IPC::RequestParser rp{ctx}; |
| 436 | 436 | ||
| 437 | const auto file_buffer = ctx.ReadBuffer(); | 437 | const auto file_buffer = ctx.ReadBuffer(); |
| @@ -456,7 +456,7 @@ public: | |||
| 456 | rb.PushIpcInterface<IDirectory>(std::move(directory)); | 456 | rb.PushIpcInterface<IDirectory>(std::move(directory)); |
| 457 | } | 457 | } |
| 458 | 458 | ||
| 459 | void GetEntryType(Kernel::HLERequestContext& ctx) { | 459 | void GetEntryType(HLERequestContext& ctx) { |
| 460 | const auto file_buffer = ctx.ReadBuffer(); | 460 | const auto file_buffer = ctx.ReadBuffer(); |
| 461 | const std::string name = Common::StringFromBuffer(file_buffer); | 461 | const std::string name = Common::StringFromBuffer(file_buffer); |
| 462 | 462 | ||
| @@ -474,14 +474,14 @@ public: | |||
| 474 | rb.Push<u32>(static_cast<u32>(*result)); | 474 | rb.Push<u32>(static_cast<u32>(*result)); |
| 475 | } | 475 | } |
| 476 | 476 | ||
| 477 | void Commit(Kernel::HLERequestContext& ctx) { | 477 | void Commit(HLERequestContext& ctx) { |
| 478 | LOG_WARNING(Service_FS, "(STUBBED) called"); | 478 | LOG_WARNING(Service_FS, "(STUBBED) called"); |
| 479 | 479 | ||
| 480 | IPC::ResponseBuilder rb{ctx, 2}; | 480 | IPC::ResponseBuilder rb{ctx, 2}; |
| 481 | rb.Push(ResultSuccess); | 481 | rb.Push(ResultSuccess); |
| 482 | } | 482 | } |
| 483 | 483 | ||
| 484 | void GetFreeSpaceSize(Kernel::HLERequestContext& ctx) { | 484 | void GetFreeSpaceSize(HLERequestContext& ctx) { |
| 485 | LOG_DEBUG(Service_FS, "called"); | 485 | LOG_DEBUG(Service_FS, "called"); |
| 486 | 486 | ||
| 487 | IPC::ResponseBuilder rb{ctx, 4}; | 487 | IPC::ResponseBuilder rb{ctx, 4}; |
| @@ -489,7 +489,7 @@ public: | |||
| 489 | rb.Push(size.get_free_size()); | 489 | rb.Push(size.get_free_size()); |
| 490 | } | 490 | } |
| 491 | 491 | ||
| 492 | void GetTotalSpaceSize(Kernel::HLERequestContext& ctx) { | 492 | void GetTotalSpaceSize(HLERequestContext& ctx) { |
| 493 | LOG_DEBUG(Service_FS, "called"); | 493 | LOG_DEBUG(Service_FS, "called"); |
| 494 | 494 | ||
| 495 | IPC::ResponseBuilder rb{ctx, 4}; | 495 | IPC::ResponseBuilder rb{ctx, 4}; |
| @@ -497,7 +497,7 @@ public: | |||
| 497 | rb.Push(size.get_total_size()); | 497 | rb.Push(size.get_total_size()); |
| 498 | } | 498 | } |
| 499 | 499 | ||
| 500 | void GetFileTimeStampRaw(Kernel::HLERequestContext& ctx) { | 500 | void GetFileTimeStampRaw(HLERequestContext& ctx) { |
| 501 | const auto file_buffer = ctx.ReadBuffer(); | 501 | const auto file_buffer = ctx.ReadBuffer(); |
| 502 | const std::string name = Common::StringFromBuffer(file_buffer); | 502 | const std::string name = Common::StringFromBuffer(file_buffer); |
| 503 | 503 | ||
| @@ -533,7 +533,7 @@ public: | |||
| 533 | FindAllSaves(space); | 533 | FindAllSaves(space); |
| 534 | } | 534 | } |
| 535 | 535 | ||
| 536 | void ReadSaveDataInfo(Kernel::HLERequestContext& ctx) { | 536 | void ReadSaveDataInfo(HLERequestContext& ctx) { |
| 537 | LOG_DEBUG(Service_FS, "called"); | 537 | LOG_DEBUG(Service_FS, "called"); |
| 538 | 538 | ||
| 539 | // Calculate how many entries we can fit in the output buffer | 539 | // Calculate how many entries we can fit in the output buffer |
| @@ -811,7 +811,7 @@ FSP_SRV::FSP_SRV(Core::System& system_) | |||
| 811 | 811 | ||
| 812 | FSP_SRV::~FSP_SRV() = default; | 812 | FSP_SRV::~FSP_SRV() = default; |
| 813 | 813 | ||
| 814 | void FSP_SRV::SetCurrentProcess(Kernel::HLERequestContext& ctx) { | 814 | void FSP_SRV::SetCurrentProcess(HLERequestContext& ctx) { |
| 815 | IPC::RequestParser rp{ctx}; | 815 | IPC::RequestParser rp{ctx}; |
| 816 | current_process_id = rp.Pop<u64>(); | 816 | current_process_id = rp.Pop<u64>(); |
| 817 | 817 | ||
| @@ -821,7 +821,7 @@ void FSP_SRV::SetCurrentProcess(Kernel::HLERequestContext& ctx) { | |||
| 821 | rb.Push(ResultSuccess); | 821 | rb.Push(ResultSuccess); |
| 822 | } | 822 | } |
| 823 | 823 | ||
| 824 | void FSP_SRV::OpenFileSystemWithPatch(Kernel::HLERequestContext& ctx) { | 824 | void FSP_SRV::OpenFileSystemWithPatch(HLERequestContext& ctx) { |
| 825 | IPC::RequestParser rp{ctx}; | 825 | IPC::RequestParser rp{ctx}; |
| 826 | 826 | ||
| 827 | const auto type = rp.PopRaw<FileSystemType>(); | 827 | const auto type = rp.PopRaw<FileSystemType>(); |
| @@ -832,7 +832,7 @@ void FSP_SRV::OpenFileSystemWithPatch(Kernel::HLERequestContext& ctx) { | |||
| 832 | rb.Push(ResultUnknown); | 832 | rb.Push(ResultUnknown); |
| 833 | } | 833 | } |
| 834 | 834 | ||
| 835 | void FSP_SRV::OpenSdCardFileSystem(Kernel::HLERequestContext& ctx) { | 835 | void FSP_SRV::OpenSdCardFileSystem(HLERequestContext& ctx) { |
| 836 | LOG_DEBUG(Service_FS, "called"); | 836 | LOG_DEBUG(Service_FS, "called"); |
| 837 | 837 | ||
| 838 | auto filesystem = | 838 | auto filesystem = |
| @@ -844,7 +844,7 @@ void FSP_SRV::OpenSdCardFileSystem(Kernel::HLERequestContext& ctx) { | |||
| 844 | rb.PushIpcInterface<IFileSystem>(std::move(filesystem)); | 844 | rb.PushIpcInterface<IFileSystem>(std::move(filesystem)); |
| 845 | } | 845 | } |
| 846 | 846 | ||
| 847 | void FSP_SRV::CreateSaveDataFileSystem(Kernel::HLERequestContext& ctx) { | 847 | void FSP_SRV::CreateSaveDataFileSystem(HLERequestContext& ctx) { |
| 848 | IPC::RequestParser rp{ctx}; | 848 | IPC::RequestParser rp{ctx}; |
| 849 | 849 | ||
| 850 | auto save_struct = rp.PopRaw<FileSys::SaveDataAttribute>(); | 850 | auto save_struct = rp.PopRaw<FileSys::SaveDataAttribute>(); |
| @@ -860,7 +860,7 @@ void FSP_SRV::CreateSaveDataFileSystem(Kernel::HLERequestContext& ctx) { | |||
| 860 | rb.Push(ResultSuccess); | 860 | rb.Push(ResultSuccess); |
| 861 | } | 861 | } |
| 862 | 862 | ||
| 863 | void FSP_SRV::OpenSaveDataFileSystem(Kernel::HLERequestContext& ctx) { | 863 | void FSP_SRV::OpenSaveDataFileSystem(HLERequestContext& ctx) { |
| 864 | IPC::RequestParser rp{ctx}; | 864 | IPC::RequestParser rp{ctx}; |
| 865 | 865 | ||
| 866 | struct Parameters { | 866 | struct Parameters { |
| @@ -905,12 +905,12 @@ void FSP_SRV::OpenSaveDataFileSystem(Kernel::HLERequestContext& ctx) { | |||
| 905 | rb.PushIpcInterface<IFileSystem>(std::move(filesystem)); | 905 | rb.PushIpcInterface<IFileSystem>(std::move(filesystem)); |
| 906 | } | 906 | } |
| 907 | 907 | ||
| 908 | void FSP_SRV::OpenReadOnlySaveDataFileSystem(Kernel::HLERequestContext& ctx) { | 908 | void FSP_SRV::OpenReadOnlySaveDataFileSystem(HLERequestContext& ctx) { |
| 909 | LOG_WARNING(Service_FS, "(STUBBED) called, delegating to 51 OpenSaveDataFilesystem"); | 909 | LOG_WARNING(Service_FS, "(STUBBED) called, delegating to 51 OpenSaveDataFilesystem"); |
| 910 | OpenSaveDataFileSystem(ctx); | 910 | OpenSaveDataFileSystem(ctx); |
| 911 | } | 911 | } |
| 912 | 912 | ||
| 913 | void FSP_SRV::OpenSaveDataInfoReaderBySaveDataSpaceId(Kernel::HLERequestContext& ctx) { | 913 | void FSP_SRV::OpenSaveDataInfoReaderBySaveDataSpaceId(HLERequestContext& ctx) { |
| 914 | IPC::RequestParser rp{ctx}; | 914 | IPC::RequestParser rp{ctx}; |
| 915 | const auto space = rp.PopRaw<FileSys::SaveDataSpaceId>(); | 915 | const auto space = rp.PopRaw<FileSys::SaveDataSpaceId>(); |
| 916 | LOG_INFO(Service_FS, "called, space={}", space); | 916 | LOG_INFO(Service_FS, "called, space={}", space); |
| @@ -921,15 +921,14 @@ void FSP_SRV::OpenSaveDataInfoReaderBySaveDataSpaceId(Kernel::HLERequestContext& | |||
| 921 | std::make_shared<ISaveDataInfoReader>(system, space, fsc)); | 921 | std::make_shared<ISaveDataInfoReader>(system, space, fsc)); |
| 922 | } | 922 | } |
| 923 | 923 | ||
| 924 | void FSP_SRV::WriteSaveDataFileSystemExtraDataBySaveDataAttribute(Kernel::HLERequestContext& ctx) { | 924 | void FSP_SRV::WriteSaveDataFileSystemExtraDataBySaveDataAttribute(HLERequestContext& ctx) { |
| 925 | LOG_WARNING(Service_FS, "(STUBBED) called."); | 925 | LOG_WARNING(Service_FS, "(STUBBED) called."); |
| 926 | 926 | ||
| 927 | IPC::ResponseBuilder rb{ctx, 2}; | 927 | IPC::ResponseBuilder rb{ctx, 2}; |
| 928 | rb.Push(ResultSuccess); | 928 | rb.Push(ResultSuccess); |
| 929 | } | 929 | } |
| 930 | 930 | ||
| 931 | void FSP_SRV::ReadSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute( | 931 | void FSP_SRV::ReadSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute(HLERequestContext& ctx) { |
| 932 | Kernel::HLERequestContext& ctx) { | ||
| 933 | IPC::RequestParser rp{ctx}; | 932 | IPC::RequestParser rp{ctx}; |
| 934 | 933 | ||
| 935 | struct Parameters { | 934 | struct Parameters { |
| @@ -955,7 +954,7 @@ void FSP_SRV::ReadSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute( | |||
| 955 | rb.Push(flags); | 954 | rb.Push(flags); |
| 956 | } | 955 | } |
| 957 | 956 | ||
| 958 | void FSP_SRV::OpenDataStorageByCurrentProcess(Kernel::HLERequestContext& ctx) { | 957 | void FSP_SRV::OpenDataStorageByCurrentProcess(HLERequestContext& ctx) { |
| 959 | LOG_DEBUG(Service_FS, "called"); | 958 | LOG_DEBUG(Service_FS, "called"); |
| 960 | 959 | ||
| 961 | auto current_romfs = fsc.OpenRomFSCurrentProcess(); | 960 | auto current_romfs = fsc.OpenRomFSCurrentProcess(); |
| @@ -974,7 +973,7 @@ void FSP_SRV::OpenDataStorageByCurrentProcess(Kernel::HLERequestContext& ctx) { | |||
| 974 | rb.PushIpcInterface<IStorage>(std::move(storage)); | 973 | rb.PushIpcInterface<IStorage>(std::move(storage)); |
| 975 | } | 974 | } |
| 976 | 975 | ||
| 977 | void FSP_SRV::OpenDataStorageByDataId(Kernel::HLERequestContext& ctx) { | 976 | void FSP_SRV::OpenDataStorageByDataId(HLERequestContext& ctx) { |
| 978 | IPC::RequestParser rp{ctx}; | 977 | IPC::RequestParser rp{ctx}; |
| 979 | const auto storage_id = rp.PopRaw<FileSys::StorageId>(); | 978 | const auto storage_id = rp.PopRaw<FileSys::StorageId>(); |
| 980 | const auto unknown = rp.PopRaw<u32>(); | 979 | const auto unknown = rp.PopRaw<u32>(); |
| @@ -1014,7 +1013,7 @@ void FSP_SRV::OpenDataStorageByDataId(Kernel::HLERequestContext& ctx) { | |||
| 1014 | rb.PushIpcInterface<IStorage>(std::move(storage)); | 1013 | rb.PushIpcInterface<IStorage>(std::move(storage)); |
| 1015 | } | 1014 | } |
| 1016 | 1015 | ||
| 1017 | void FSP_SRV::OpenPatchDataStorageByCurrentProcess(Kernel::HLERequestContext& ctx) { | 1016 | void FSP_SRV::OpenPatchDataStorageByCurrentProcess(HLERequestContext& ctx) { |
| 1018 | IPC::RequestParser rp{ctx}; | 1017 | IPC::RequestParser rp{ctx}; |
| 1019 | 1018 | ||
| 1020 | const auto storage_id = rp.PopRaw<FileSys::StorageId>(); | 1019 | const auto storage_id = rp.PopRaw<FileSys::StorageId>(); |
| @@ -1026,7 +1025,7 @@ void FSP_SRV::OpenPatchDataStorageByCurrentProcess(Kernel::HLERequestContext& ct | |||
| 1026 | rb.Push(FileSys::ERROR_ENTITY_NOT_FOUND); | 1025 | rb.Push(FileSys::ERROR_ENTITY_NOT_FOUND); |
| 1027 | } | 1026 | } |
| 1028 | 1027 | ||
| 1029 | void FSP_SRV::OpenDataStorageWithProgramIndex(Kernel::HLERequestContext& ctx) { | 1028 | void FSP_SRV::OpenDataStorageWithProgramIndex(HLERequestContext& ctx) { |
| 1030 | IPC::RequestParser rp{ctx}; | 1029 | IPC::RequestParser rp{ctx}; |
| 1031 | 1030 | ||
| 1032 | const auto program_index = rp.PopRaw<u8>(); | 1031 | const auto program_index = rp.PopRaw<u8>(); |
| @@ -1053,7 +1052,7 @@ void FSP_SRV::OpenDataStorageWithProgramIndex(Kernel::HLERequestContext& ctx) { | |||
| 1053 | rb.PushIpcInterface<IStorage>(std::move(storage)); | 1052 | rb.PushIpcInterface<IStorage>(std::move(storage)); |
| 1054 | } | 1053 | } |
| 1055 | 1054 | ||
| 1056 | void FSP_SRV::DisableAutoSaveDataCreation(Kernel::HLERequestContext& ctx) { | 1055 | void FSP_SRV::DisableAutoSaveDataCreation(HLERequestContext& ctx) { |
| 1057 | LOG_DEBUG(Service_FS, "called"); | 1056 | LOG_DEBUG(Service_FS, "called"); |
| 1058 | 1057 | ||
| 1059 | fsc.SetAutoSaveDataCreation(false); | 1058 | fsc.SetAutoSaveDataCreation(false); |
| @@ -1062,7 +1061,7 @@ void FSP_SRV::DisableAutoSaveDataCreation(Kernel::HLERequestContext& ctx) { | |||
| 1062 | rb.Push(ResultSuccess); | 1061 | rb.Push(ResultSuccess); |
| 1063 | } | 1062 | } |
| 1064 | 1063 | ||
| 1065 | void FSP_SRV::SetGlobalAccessLogMode(Kernel::HLERequestContext& ctx) { | 1064 | void FSP_SRV::SetGlobalAccessLogMode(HLERequestContext& ctx) { |
| 1066 | IPC::RequestParser rp{ctx}; | 1065 | IPC::RequestParser rp{ctx}; |
| 1067 | access_log_mode = rp.PopEnum<AccessLogMode>(); | 1066 | access_log_mode = rp.PopEnum<AccessLogMode>(); |
| 1068 | 1067 | ||
| @@ -1072,7 +1071,7 @@ void FSP_SRV::SetGlobalAccessLogMode(Kernel::HLERequestContext& ctx) { | |||
| 1072 | rb.Push(ResultSuccess); | 1071 | rb.Push(ResultSuccess); |
| 1073 | } | 1072 | } |
| 1074 | 1073 | ||
| 1075 | void FSP_SRV::GetGlobalAccessLogMode(Kernel::HLERequestContext& ctx) { | 1074 | void FSP_SRV::GetGlobalAccessLogMode(HLERequestContext& ctx) { |
| 1076 | LOG_DEBUG(Service_FS, "called"); | 1075 | LOG_DEBUG(Service_FS, "called"); |
| 1077 | 1076 | ||
| 1078 | IPC::ResponseBuilder rb{ctx, 3}; | 1077 | IPC::ResponseBuilder rb{ctx, 3}; |
| @@ -1080,7 +1079,7 @@ void FSP_SRV::GetGlobalAccessLogMode(Kernel::HLERequestContext& ctx) { | |||
| 1080 | rb.PushEnum(access_log_mode); | 1079 | rb.PushEnum(access_log_mode); |
| 1081 | } | 1080 | } |
| 1082 | 1081 | ||
| 1083 | void FSP_SRV::OutputAccessLogToSdCard(Kernel::HLERequestContext& ctx) { | 1082 | void FSP_SRV::OutputAccessLogToSdCard(HLERequestContext& ctx) { |
| 1084 | const auto raw = ctx.ReadBufferCopy(); | 1083 | const auto raw = ctx.ReadBufferCopy(); |
| 1085 | auto log = Common::StringFromFixedZeroTerminatedBuffer( | 1084 | auto log = Common::StringFromFixedZeroTerminatedBuffer( |
| 1086 | reinterpret_cast<const char*>(raw.data()), raw.size()); | 1085 | reinterpret_cast<const char*>(raw.data()), raw.size()); |
| @@ -1093,7 +1092,7 @@ void FSP_SRV::OutputAccessLogToSdCard(Kernel::HLERequestContext& ctx) { | |||
| 1093 | rb.Push(ResultSuccess); | 1092 | rb.Push(ResultSuccess); |
| 1094 | } | 1093 | } |
| 1095 | 1094 | ||
| 1096 | void FSP_SRV::GetProgramIndexForAccessLog(Kernel::HLERequestContext& ctx) { | 1095 | void FSP_SRV::GetProgramIndexForAccessLog(HLERequestContext& ctx) { |
| 1097 | LOG_DEBUG(Service_FS, "called"); | 1096 | LOG_DEBUG(Service_FS, "called"); |
| 1098 | 1097 | ||
| 1099 | IPC::ResponseBuilder rb{ctx, 4}; | 1098 | IPC::ResponseBuilder rb{ctx, 4}; |
| @@ -1102,7 +1101,7 @@ void FSP_SRV::GetProgramIndexForAccessLog(Kernel::HLERequestContext& ctx) { | |||
| 1102 | rb.Push(access_log_program_index); | 1101 | rb.Push(access_log_program_index); |
| 1103 | } | 1102 | } |
| 1104 | 1103 | ||
| 1105 | void FSP_SRV::GetCacheStorageSize(Kernel::HLERequestContext& ctx) { | 1104 | void FSP_SRV::GetCacheStorageSize(HLERequestContext& ctx) { |
| 1106 | IPC::RequestParser rp{ctx}; | 1105 | IPC::RequestParser rp{ctx}; |
| 1107 | const auto index{rp.Pop<s32>()}; | 1106 | const auto index{rp.Pop<s32>()}; |
| 1108 | 1107 | ||
| @@ -1128,14 +1127,14 @@ public: | |||
| 1128 | private: | 1127 | private: |
| 1129 | FileSys::VirtualFile backend; | 1128 | FileSys::VirtualFile backend; |
| 1130 | 1129 | ||
| 1131 | void Add(Kernel::HLERequestContext& ctx) { | 1130 | void Add(HLERequestContext& ctx) { |
| 1132 | LOG_WARNING(Service_FS, "(STUBBED) called"); | 1131 | LOG_WARNING(Service_FS, "(STUBBED) called"); |
| 1133 | 1132 | ||
| 1134 | IPC::ResponseBuilder rb{ctx, 2}; | 1133 | IPC::ResponseBuilder rb{ctx, 2}; |
| 1135 | rb.Push(ResultSuccess); | 1134 | rb.Push(ResultSuccess); |
| 1136 | } | 1135 | } |
| 1137 | 1136 | ||
| 1138 | void Commit(Kernel::HLERequestContext& ctx) { | 1137 | void Commit(HLERequestContext& ctx) { |
| 1139 | LOG_WARNING(Service_FS, "(STUBBED) called"); | 1138 | LOG_WARNING(Service_FS, "(STUBBED) called"); |
| 1140 | 1139 | ||
| 1141 | IPC::ResponseBuilder rb{ctx, 2}; | 1140 | IPC::ResponseBuilder rb{ctx, 2}; |
| @@ -1143,7 +1142,7 @@ private: | |||
| 1143 | } | 1142 | } |
| 1144 | }; | 1143 | }; |
| 1145 | 1144 | ||
| 1146 | void FSP_SRV::OpenMultiCommitManager(Kernel::HLERequestContext& ctx) { | 1145 | void FSP_SRV::OpenMultiCommitManager(HLERequestContext& ctx) { |
| 1147 | LOG_DEBUG(Service_FS, "called"); | 1146 | LOG_DEBUG(Service_FS, "called"); |
| 1148 | 1147 | ||
| 1149 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 1148 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
diff --git a/src/core/hle/service/filesystem/fsp_srv.h b/src/core/hle/service/filesystem/fsp_srv.h index 3d88b97f9..49f17c7c3 100644 --- a/src/core/hle/service/filesystem/fsp_srv.h +++ b/src/core/hle/service/filesystem/fsp_srv.h | |||
| @@ -35,26 +35,26 @@ public: | |||
| 35 | ~FSP_SRV() override; | 35 | ~FSP_SRV() override; |
| 36 | 36 | ||
| 37 | private: | 37 | private: |
| 38 | void SetCurrentProcess(Kernel::HLERequestContext& ctx); | 38 | void SetCurrentProcess(HLERequestContext& ctx); |
| 39 | void OpenFileSystemWithPatch(Kernel::HLERequestContext& ctx); | 39 | void OpenFileSystemWithPatch(HLERequestContext& ctx); |
| 40 | void OpenSdCardFileSystem(Kernel::HLERequestContext& ctx); | 40 | void OpenSdCardFileSystem(HLERequestContext& ctx); |
| 41 | void CreateSaveDataFileSystem(Kernel::HLERequestContext& ctx); | 41 | void CreateSaveDataFileSystem(HLERequestContext& ctx); |
| 42 | void OpenSaveDataFileSystem(Kernel::HLERequestContext& ctx); | 42 | void OpenSaveDataFileSystem(HLERequestContext& ctx); |
| 43 | void OpenReadOnlySaveDataFileSystem(Kernel::HLERequestContext& ctx); | 43 | void OpenReadOnlySaveDataFileSystem(HLERequestContext& ctx); |
| 44 | void OpenSaveDataInfoReaderBySaveDataSpaceId(Kernel::HLERequestContext& ctx); | 44 | void OpenSaveDataInfoReaderBySaveDataSpaceId(HLERequestContext& ctx); |
| 45 | void WriteSaveDataFileSystemExtraDataBySaveDataAttribute(Kernel::HLERequestContext& ctx); | 45 | void WriteSaveDataFileSystemExtraDataBySaveDataAttribute(HLERequestContext& ctx); |
| 46 | void ReadSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute(Kernel::HLERequestContext& ctx); | 46 | void ReadSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute(HLERequestContext& ctx); |
| 47 | void OpenDataStorageByCurrentProcess(Kernel::HLERequestContext& ctx); | 47 | void OpenDataStorageByCurrentProcess(HLERequestContext& ctx); |
| 48 | void OpenDataStorageByDataId(Kernel::HLERequestContext& ctx); | 48 | void OpenDataStorageByDataId(HLERequestContext& ctx); |
| 49 | void OpenPatchDataStorageByCurrentProcess(Kernel::HLERequestContext& ctx); | 49 | void OpenPatchDataStorageByCurrentProcess(HLERequestContext& ctx); |
| 50 | void OpenDataStorageWithProgramIndex(Kernel::HLERequestContext& ctx); | 50 | void OpenDataStorageWithProgramIndex(HLERequestContext& ctx); |
| 51 | void DisableAutoSaveDataCreation(Kernel::HLERequestContext& ctx); | 51 | void DisableAutoSaveDataCreation(HLERequestContext& ctx); |
| 52 | void SetGlobalAccessLogMode(Kernel::HLERequestContext& ctx); | 52 | void SetGlobalAccessLogMode(HLERequestContext& ctx); |
| 53 | void GetGlobalAccessLogMode(Kernel::HLERequestContext& ctx); | 53 | void GetGlobalAccessLogMode(HLERequestContext& ctx); |
| 54 | void OutputAccessLogToSdCard(Kernel::HLERequestContext& ctx); | 54 | void OutputAccessLogToSdCard(HLERequestContext& ctx); |
| 55 | void GetProgramIndexForAccessLog(Kernel::HLERequestContext& ctx); | 55 | void GetProgramIndexForAccessLog(HLERequestContext& ctx); |
| 56 | void OpenMultiCommitManager(Kernel::HLERequestContext& ctx); | 56 | void OpenMultiCommitManager(HLERequestContext& ctx); |
| 57 | void GetCacheStorageSize(Kernel::HLERequestContext& ctx); | 57 | void GetCacheStorageSize(HLERequestContext& ctx); |
| 58 | 58 | ||
| 59 | FileSystemController& fsc; | 59 | FileSystemController& fsc; |
| 60 | const FileSys::ContentProvider& content_provider; | 60 | const FileSys::ContentProvider& content_provider; |