diff options
| author | 2024-02-24 12:18:13 -0500 | |
|---|---|---|
| committer | 2024-02-24 22:25:34 -0500 | |
| commit | 637c54e205091e285ea6ebdba108ac3dae9f0ce0 (patch) | |
| tree | 9799c151ee5ced0807a2a0339f890fc483cb5e20 /src | |
| parent | erpt: stub report creation (diff) | |
| download | yuzu-637c54e205091e285ea6ebdba108ac3dae9f0ce0.tar.gz yuzu-637c54e205091e285ea6ebdba108ac3dae9f0ce0.tar.xz yuzu-637c54e205091e285ea6ebdba108ac3dae9f0ce0.zip | |
fs: add stubs for online web applet
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/filesystem/fsp/fsp_srv.cpp | 72 | ||||
| -rw-r--r-- | src/core/hle/service/filesystem/fsp/fsp_srv.h | 16 |
2 files changed, 79 insertions, 9 deletions
diff --git a/src/core/hle/service/filesystem/fsp/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp/fsp_srv.cpp index 223284255..60290f1a6 100644 --- a/src/core/hle/service/filesystem/fsp/fsp_srv.cpp +++ b/src/core/hle/service/filesystem/fsp/fsp_srv.cpp | |||
| @@ -71,7 +71,7 @@ FSP_SRV::FSP_SRV(Core::System& system_) | |||
| 71 | {28, nullptr, "DeleteSaveDataFileSystemBySaveDataAttribute"}, | 71 | {28, nullptr, "DeleteSaveDataFileSystemBySaveDataAttribute"}, |
| 72 | {30, nullptr, "OpenGameCardStorage"}, | 72 | {30, nullptr, "OpenGameCardStorage"}, |
| 73 | {31, nullptr, "OpenGameCardFileSystem"}, | 73 | {31, nullptr, "OpenGameCardFileSystem"}, |
| 74 | {32, nullptr, "ExtendSaveDataFileSystem"}, | 74 | {32, D<&FSP_SRV::ExtendSaveDataFileSystem>, "ExtendSaveDataFileSystem"}, |
| 75 | {33, nullptr, "DeleteCacheStorage"}, | 75 | {33, nullptr, "DeleteCacheStorage"}, |
| 76 | {34, D<&FSP_SRV::GetCacheStorageSize>, "GetCacheStorageSize"}, | 76 | {34, D<&FSP_SRV::GetCacheStorageSize>, "GetCacheStorageSize"}, |
| 77 | {35, nullptr, "CreateSaveDataFileSystemByHashSalt"}, | 77 | {35, nullptr, "CreateSaveDataFileSystemByHashSalt"}, |
| @@ -79,9 +79,9 @@ FSP_SRV::FSP_SRV(Core::System& system_) | |||
| 79 | {51, D<&FSP_SRV::OpenSaveDataFileSystem>, "OpenSaveDataFileSystem"}, | 79 | {51, D<&FSP_SRV::OpenSaveDataFileSystem>, "OpenSaveDataFileSystem"}, |
| 80 | {52, D<&FSP_SRV::OpenSaveDataFileSystemBySystemSaveDataId>, "OpenSaveDataFileSystemBySystemSaveDataId"}, | 80 | {52, D<&FSP_SRV::OpenSaveDataFileSystemBySystemSaveDataId>, "OpenSaveDataFileSystemBySystemSaveDataId"}, |
| 81 | {53, D<&FSP_SRV::OpenReadOnlySaveDataFileSystem>, "OpenReadOnlySaveDataFileSystem"}, | 81 | {53, D<&FSP_SRV::OpenReadOnlySaveDataFileSystem>, "OpenReadOnlySaveDataFileSystem"}, |
| 82 | {57, nullptr, "ReadSaveDataFileSystemExtraDataBySaveDataSpaceId"}, | 82 | {57, D<&FSP_SRV::ReadSaveDataFileSystemExtraDataBySaveDataSpaceId>, "ReadSaveDataFileSystemExtraDataBySaveDataSpaceId"}, |
| 83 | {58, nullptr, "ReadSaveDataFileSystemExtraData"}, | 83 | {58, D<&FSP_SRV::ReadSaveDataFileSystemExtraData>, "ReadSaveDataFileSystemExtraData"}, |
| 84 | {59, nullptr, "WriteSaveDataFileSystemExtraData"}, | 84 | {59, D<&FSP_SRV::WriteSaveDataFileSystemExtraData>, "WriteSaveDataFileSystemExtraData"}, |
| 85 | {60, nullptr, "OpenSaveDataInfoReader"}, | 85 | {60, nullptr, "OpenSaveDataInfoReader"}, |
| 86 | {61, D<&FSP_SRV::OpenSaveDataInfoReaderBySaveDataSpaceId>, "OpenSaveDataInfoReaderBySaveDataSpaceId"}, | 86 | {61, D<&FSP_SRV::OpenSaveDataInfoReaderBySaveDataSpaceId>, "OpenSaveDataInfoReaderBySaveDataSpaceId"}, |
| 87 | {62, D<&FSP_SRV::OpenSaveDataInfoReaderOnlyCacheStorage>, "OpenSaveDataInfoReaderOnlyCacheStorage"}, | 87 | {62, D<&FSP_SRV::OpenSaveDataInfoReaderOnlyCacheStorage>, "OpenSaveDataInfoReaderOnlyCacheStorage"}, |
| @@ -90,8 +90,8 @@ FSP_SRV::FSP_SRV(Core::System& system_) | |||
| 90 | {66, nullptr, "WriteSaveDataFileSystemExtraData2"}, | 90 | {66, nullptr, "WriteSaveDataFileSystemExtraData2"}, |
| 91 | {67, D<&FSP_SRV::FindSaveDataWithFilter>, "FindSaveDataWithFilter"}, | 91 | {67, D<&FSP_SRV::FindSaveDataWithFilter>, "FindSaveDataWithFilter"}, |
| 92 | {68, nullptr, "OpenSaveDataInfoReaderBySaveDataFilter"}, | 92 | {68, nullptr, "OpenSaveDataInfoReaderBySaveDataFilter"}, |
| 93 | {69, nullptr, "ReadSaveDataFileSystemExtraDataBySaveDataAttribute"}, | 93 | {69, D<&FSP_SRV::ReadSaveDataFileSystemExtraDataBySaveDataAttribute>, "ReadSaveDataFileSystemExtraDataBySaveDataAttribute"}, |
| 94 | {70, D<&FSP_SRV::WriteSaveDataFileSystemExtraDataBySaveDataAttribute>, "WriteSaveDataFileSystemExtraDataBySaveDataAttribute"}, | 94 | {70, D<&FSP_SRV::WriteSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute>, "WriteSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute"}, |
| 95 | {71, D<&FSP_SRV::ReadSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute>, "ReadSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute"}, | 95 | {71, D<&FSP_SRV::ReadSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute>, "ReadSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute"}, |
| 96 | {80, nullptr, "OpenSaveDataMetaFile"}, | 96 | {80, nullptr, "OpenSaveDataMetaFile"}, |
| 97 | {81, nullptr, "OpenSaveDataTransferManager"}, | 97 | {81, nullptr, "OpenSaveDataTransferManager"}, |
| @@ -317,9 +317,23 @@ Result FSP_SRV::FindSaveDataWithFilter(Out<s64> out_count, | |||
| 317 | R_THROW(FileSys::ResultTargetNotFound); | 317 | R_THROW(FileSys::ResultTargetNotFound); |
| 318 | } | 318 | } |
| 319 | 319 | ||
| 320 | Result FSP_SRV::WriteSaveDataFileSystemExtraDataBySaveDataAttribute() { | 320 | Result FSP_SRV::WriteSaveDataFileSystemExtraData(InBuffer<BufferAttr_HipcMapAlias> buffer, |
| 321 | LOG_WARNING(Service_FS, "(STUBBED) called."); | 321 | FileSys::SaveDataSpaceId space_id, |
| 322 | u64 save_data_id) { | ||
| 323 | LOG_WARNING(Service_FS, "(STUBBED) called, space_id={}, save_data_id={:016X}", space_id, | ||
| 324 | save_data_id); | ||
| 325 | R_SUCCEED(); | ||
| 326 | } | ||
| 322 | 327 | ||
| 328 | Result FSP_SRV::WriteSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute( | ||
| 329 | InBuffer<BufferAttr_HipcMapAlias> buffer, InBuffer<BufferAttr_HipcMapAlias> mask_buffer, | ||
| 330 | FileSys::SaveDataSpaceId space_id, FileSys::SaveDataAttribute attribute) { | ||
| 331 | LOG_WARNING(Service_FS, | ||
| 332 | "(STUBBED) called, space_id={}, attribute.program_id={:016X}\n" | ||
| 333 | "attribute.user_id={:016X}{:016X}, attribute.save_id={:016X}\n" | ||
| 334 | "attribute.type={}, attribute.rank={}, attribute.index={}", | ||
| 335 | space_id, attribute.program_id, attribute.user_id[1], attribute.user_id[0], | ||
| 336 | attribute.system_save_data_id, attribute.type, attribute.rank, attribute.index); | ||
| 323 | R_SUCCEED(); | 337 | R_SUCCEED(); |
| 324 | } | 338 | } |
| 325 | 339 | ||
| @@ -341,6 +355,38 @@ Result FSP_SRV::ReadSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute( | |||
| 341 | R_SUCCEED(); | 355 | R_SUCCEED(); |
| 342 | } | 356 | } |
| 343 | 357 | ||
| 358 | Result FSP_SRV::ReadSaveDataFileSystemExtraData(OutBuffer<BufferAttr_HipcMapAlias> out_buffer, | ||
| 359 | u64 save_data_id) { | ||
| 360 | // Stub, backend needs an impl to read/write the SaveDataExtraData | ||
| 361 | LOG_WARNING(Service_FS, "(STUBBED) called, save_data_id={:016X}", save_data_id); | ||
| 362 | std::memset(out_buffer.data(), 0, out_buffer.size()); | ||
| 363 | R_SUCCEED(); | ||
| 364 | } | ||
| 365 | |||
| 366 | Result FSP_SRV::ReadSaveDataFileSystemExtraDataBySaveDataAttribute( | ||
| 367 | OutBuffer<BufferAttr_HipcMapAlias> out_buffer, FileSys::SaveDataSpaceId space_id, | ||
| 368 | FileSys::SaveDataAttribute attribute) { | ||
| 369 | // Stub, backend needs an impl to read/write the SaveDataExtraData | ||
| 370 | LOG_WARNING(Service_FS, | ||
| 371 | "(STUBBED) called, space_id={}, attribute.program_id={:016X}\n" | ||
| 372 | "attribute.user_id={:016X}{:016X}, attribute.save_id={:016X}\n" | ||
| 373 | "attribute.type={}, attribute.rank={}, attribute.index={}", | ||
| 374 | space_id, attribute.program_id, attribute.user_id[1], attribute.user_id[0], | ||
| 375 | attribute.system_save_data_id, attribute.type, attribute.rank, attribute.index); | ||
| 376 | std::memset(out_buffer.data(), 0, out_buffer.size()); | ||
| 377 | R_SUCCEED(); | ||
| 378 | } | ||
| 379 | |||
| 380 | Result FSP_SRV::ReadSaveDataFileSystemExtraDataBySaveDataSpaceId( | ||
| 381 | OutBuffer<BufferAttr_HipcMapAlias> out_buffer, FileSys::SaveDataSpaceId space_id, | ||
| 382 | u64 save_data_id) { | ||
| 383 | // Stub, backend needs an impl to read/write the SaveDataExtraData | ||
| 384 | LOG_WARNING(Service_FS, "(STUBBED) called, space_id={}, save_data_id={:016X}", space_id, | ||
| 385 | save_data_id); | ||
| 386 | std::memset(out_buffer.data(), 0, out_buffer.size()); | ||
| 387 | R_SUCCEED(); | ||
| 388 | } | ||
| 389 | |||
| 344 | Result FSP_SRV::OpenSaveDataTransferProhibiter( | 390 | Result FSP_SRV::OpenSaveDataTransferProhibiter( |
| 345 | OutInterface<ISaveDataTransferProhibiter> out_prohibiter, u64 id) { | 391 | OutInterface<ISaveDataTransferProhibiter> out_prohibiter, u64 id) { |
| 346 | LOG_WARNING(Service_FS, "(STUBBED) called, id={:016X}", id); | 392 | LOG_WARNING(Service_FS, "(STUBBED) called, id={:016X}", id); |
| @@ -476,6 +522,16 @@ Result FSP_SRV::FlushAccessLogOnSdCard() { | |||
| 476 | R_SUCCEED(); | 522 | R_SUCCEED(); |
| 477 | } | 523 | } |
| 478 | 524 | ||
| 525 | Result FSP_SRV::ExtendSaveDataFileSystem(FileSys::SaveDataSpaceId space_id, u64 save_data_id, | ||
| 526 | s64 available_size, s64 journal_size) { | ||
| 527 | // We don't have an index of save data ids, so we can't implement this. | ||
| 528 | LOG_WARNING(Service_FS, | ||
| 529 | "(STUBBED) called, space_id={}, save_data_id={:016X}, available_size={:#x}, " | ||
| 530 | "journal_size={:#x}", | ||
| 531 | space_id, save_data_id, available_size, journal_size); | ||
| 532 | R_SUCCEED(); | ||
| 533 | } | ||
| 534 | |||
| 479 | Result FSP_SRV::GetCacheStorageSize(s32 index, Out<s64> out_data_size, Out<s64> out_journal_size) { | 535 | Result FSP_SRV::GetCacheStorageSize(s32 index, Out<s64> out_data_size, Out<s64> out_journal_size) { |
| 480 | LOG_WARNING(Service_FS, "(STUBBED) called with index={}", index); | 536 | LOG_WARNING(Service_FS, "(STUBBED) called with index={}", index); |
| 481 | 537 | ||
diff --git a/src/core/hle/service/filesystem/fsp/fsp_srv.h b/src/core/hle/service/filesystem/fsp/fsp_srv.h index 83d9cb51c..b565cace0 100644 --- a/src/core/hle/service/filesystem/fsp/fsp_srv.h +++ b/src/core/hle/service/filesystem/fsp/fsp_srv.h | |||
| @@ -70,7 +70,19 @@ private: | |||
| 70 | Result FindSaveDataWithFilter(Out<s64> out_count, OutBuffer<BufferAttr_HipcMapAlias> out_buffer, | 70 | Result FindSaveDataWithFilter(Out<s64> out_count, OutBuffer<BufferAttr_HipcMapAlias> out_buffer, |
| 71 | FileSys::SaveDataSpaceId space_id, | 71 | FileSys::SaveDataSpaceId space_id, |
| 72 | FileSys::SaveDataFilter filter); | 72 | FileSys::SaveDataFilter filter); |
| 73 | Result WriteSaveDataFileSystemExtraDataBySaveDataAttribute(); | 73 | Result WriteSaveDataFileSystemExtraData(InBuffer<BufferAttr_HipcMapAlias> buffer, |
| 74 | FileSys::SaveDataSpaceId space_id, u64 save_data_id); | ||
| 75 | Result WriteSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute( | ||
| 76 | InBuffer<BufferAttr_HipcMapAlias> buffer, InBuffer<BufferAttr_HipcMapAlias> mask_buffer, | ||
| 77 | FileSys::SaveDataSpaceId space_id, FileSys::SaveDataAttribute attribute); | ||
| 78 | Result ReadSaveDataFileSystemExtraData(OutBuffer<BufferAttr_HipcMapAlias> out_buffer, | ||
| 79 | u64 save_data_id); | ||
| 80 | Result ReadSaveDataFileSystemExtraDataBySaveDataAttribute( | ||
| 81 | OutBuffer<BufferAttr_HipcMapAlias> out_buffer, FileSys::SaveDataSpaceId space_id, | ||
| 82 | FileSys::SaveDataAttribute attribute); | ||
| 83 | Result ReadSaveDataFileSystemExtraDataBySaveDataSpaceId( | ||
| 84 | OutBuffer<BufferAttr_HipcMapAlias> out_buffer, FileSys::SaveDataSpaceId space_id, | ||
| 85 | u64 save_data_id); | ||
| 74 | Result ReadSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute( | 86 | Result ReadSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute( |
| 75 | FileSys::SaveDataSpaceId space_id, FileSys::SaveDataAttribute attribute, | 87 | FileSys::SaveDataSpaceId space_id, FileSys::SaveDataAttribute attribute, |
| 76 | InBuffer<BufferAttr_HipcMapAlias> mask_buffer, | 88 | InBuffer<BufferAttr_HipcMapAlias> mask_buffer, |
| @@ -91,6 +103,8 @@ private: | |||
| 91 | Result GetProgramIndexForAccessLog(Out<AccessLogVersion> out_access_log_version, | 103 | Result GetProgramIndexForAccessLog(Out<AccessLogVersion> out_access_log_version, |
| 92 | Out<u32> out_access_log_program_index); | 104 | Out<u32> out_access_log_program_index); |
| 93 | Result OpenMultiCommitManager(OutInterface<IMultiCommitManager> out_interface); | 105 | Result OpenMultiCommitManager(OutInterface<IMultiCommitManager> out_interface); |
| 106 | Result ExtendSaveDataFileSystem(FileSys::SaveDataSpaceId space_id, u64 save_data_id, | ||
| 107 | s64 available_size, s64 journal_size); | ||
| 94 | Result GetCacheStorageSize(s32 index, Out<s64> out_data_size, Out<s64> out_journal_size); | 108 | Result GetCacheStorageSize(s32 index, Out<s64> out_data_size, Out<s64> out_journal_size); |
| 95 | 109 | ||
| 96 | FileSystemController& fsc; | 110 | FileSystemController& fsc; |