mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-10-21 02:07:49 +00:00
This reverts commit 218c6705d9.
- [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions).
- [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md).
- [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability.
-------------------
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4532
Reviewed-by: lizzie <lizzie@eden-emu.dev>
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
Reviewed-by: Maufeat <sahyno1996@gmail.com>
This commit is contained in:
@@ -11,18 +11,15 @@
|
||||
|
||||
namespace Service::FileSystem {
|
||||
|
||||
std::optional<ServiceFrameworkBase::FunctionInfoBase> IDirectory::FindRequest(u32 key) {
|
||||
static constexpr auto functions = CreateStaticMap(
|
||||
FunctionInfo{0, D<&IDirectory::Read>, "Read"},
|
||||
FunctionInfo{1, D<&IDirectory::GetEntryCount>, "GetEntryCount"}
|
||||
);
|
||||
return HandlerTableGenerateWithFind(key, functions);
|
||||
}
|
||||
|
||||
IDirectory::IDirectory(Core::System& system_, FileSys::VirtualDir directory_,
|
||||
FileSys::OpenDirectoryMode mode)
|
||||
: ServiceFramework{system_, "IDirectory"},
|
||||
backend(std::make_unique<FileSys::Fsa::IDirectory>(directory_, mode)) {
|
||||
static const FunctionInfo functions[] = {
|
||||
{0, D<&IDirectory::Read>, "Read"},
|
||||
{1, D<&IDirectory::GetEntryCount>, "GetEntryCount"},
|
||||
};
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
Result IDirectory::Read(
|
||||
|
||||
@@ -29,8 +29,6 @@ private:
|
||||
Result Read(Out<s64> out_count,
|
||||
const OutArray<FileSys::DirectoryEntry, BufferAttr_HipcMapAlias> out_entries);
|
||||
Result GetEntryCount(Out<s64> out_count);
|
||||
|
||||
std::optional<FunctionInfoBase> FindRequest(u32 key) override;
|
||||
};
|
||||
|
||||
} // namespace Service::FileSystem
|
||||
|
||||
@@ -12,6 +12,18 @@ namespace Service::FileSystem {
|
||||
|
||||
IFile::IFile(Core::System& system_, FileSys::VirtualFile file_)
|
||||
: ServiceFramework{system_, "IFile"}, backend{std::make_unique<FileSys::Fsa::IFile>(file_)} {
|
||||
// clang-format off
|
||||
static const FunctionInfo functions[] = {
|
||||
{0, D<&IFile::Read>, "Read"},
|
||||
{1, D<&IFile::Write>, "Write"},
|
||||
{2, D<&IFile::Flush>, "Flush"},
|
||||
{3, D<&IFile::SetSize>, "SetSize"},
|
||||
{4, D<&IFile::GetSize>, "GetSize"},
|
||||
{5, nullptr, "OperateRange"},
|
||||
{6, nullptr, "OperateRangeWithBuffer"},
|
||||
};
|
||||
// clang-format on
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
Result IFile::Read(
|
||||
|
||||
@@ -30,19 +30,6 @@ private:
|
||||
Result Flush();
|
||||
Result SetSize(s64 size);
|
||||
Result GetSize(Out<s64> out_size);
|
||||
|
||||
std::optional<FunctionInfoBase> FindRequest(u32 key) override {
|
||||
return HandlerTableGenerateWithFind(key, functions);
|
||||
}
|
||||
static constexpr auto functions = CreateStaticMap(
|
||||
FunctionInfo{0, D<&IFile::Read>, "Read"},
|
||||
FunctionInfo{1, D<&IFile::Write>, "Write"},
|
||||
FunctionInfo{2, D<&IFile::Flush>, "Flush"},
|
||||
FunctionInfo{3, D<&IFile::SetSize>, "SetSize"},
|
||||
FunctionInfo{4, D<&IFile::GetSize>, "GetSize"},
|
||||
FunctionInfo{5, nullptr, "OperateRange"},
|
||||
FunctionInfo{6, nullptr, "OperateRangeWithBuffer"}
|
||||
);
|
||||
};
|
||||
|
||||
} // namespace Service::FileSystem
|
||||
|
||||
@@ -13,33 +13,30 @@
|
||||
|
||||
namespace Service::FileSystem {
|
||||
|
||||
std::optional<ServiceFrameworkBase::FunctionInfoBase> IFileSystem::FindRequest(u32 key) {
|
||||
static constexpr auto functions = CreateStaticMap(
|
||||
FunctionInfo{0, D<&IFileSystem::CreateFile>, "CreateFile"},
|
||||
FunctionInfo{1, D<&IFileSystem::DeleteFile>, "DeleteFile"},
|
||||
FunctionInfo{2, D<&IFileSystem::CreateDirectory>, "CreateDirectory"},
|
||||
FunctionInfo{3, D<&IFileSystem::DeleteDirectory>, "DeleteDirectory"},
|
||||
FunctionInfo{4, D<&IFileSystem::DeleteDirectoryRecursively>, "DeleteDirectoryRecursively"},
|
||||
FunctionInfo{5, D<&IFileSystem::RenameFile>, "RenameFile"},
|
||||
FunctionInfo{6, D<&IFileSystem::RenameDirectory>, "RenameDirectory"},
|
||||
FunctionInfo{7, D<&IFileSystem::GetEntryType>, "GetEntryType"},
|
||||
FunctionInfo{8, D<&IFileSystem::OpenFile>, "OpenFile"},
|
||||
FunctionInfo{9, D<&IFileSystem::OpenDirectory>, "OpenDirectory"},
|
||||
FunctionInfo{10, D<&IFileSystem::Commit>, "Commit"},
|
||||
FunctionInfo{11, D<&IFileSystem::GetFreeSpaceSize>, "GetFreeSpaceSize"},
|
||||
FunctionInfo{12, D<&IFileSystem::GetTotalSpaceSize>, "GetTotalSpaceSize"},
|
||||
FunctionInfo{13, D<&IFileSystem::CleanDirectoryRecursively>, "CleanDirectoryRecursively"},
|
||||
FunctionInfo{14, D<&IFileSystem::GetFileTimeStampRaw>, "GetFileTimeStampRaw"},
|
||||
FunctionInfo{15, nullptr, "QueryEntry"},
|
||||
FunctionInfo{16, D<&IFileSystem::GetFileSystemAttribute>, "GetFileSystemAttribute"}
|
||||
);
|
||||
return HandlerTableGenerateWithFind(key, functions);
|
||||
}
|
||||
|
||||
IFileSystem::IFileSystem(Core::System& system_, FileSys::VirtualDir dir_, SizeGetter size_getter_)
|
||||
: ServiceFramework{system_, "IFileSystem"}, backend{std::make_unique<FileSys::Fsa::IFileSystem>(
|
||||
dir_)},
|
||||
size_getter{std::move(size_getter_)} {
|
||||
static const FunctionInfo functions[] = {
|
||||
{0, D<&IFileSystem::CreateFile>, "CreateFile"},
|
||||
{1, D<&IFileSystem::DeleteFile>, "DeleteFile"},
|
||||
{2, D<&IFileSystem::CreateDirectory>, "CreateDirectory"},
|
||||
{3, D<&IFileSystem::DeleteDirectory>, "DeleteDirectory"},
|
||||
{4, D<&IFileSystem::DeleteDirectoryRecursively>, "DeleteDirectoryRecursively"},
|
||||
{5, D<&IFileSystem::RenameFile>, "RenameFile"},
|
||||
{6, D<&IFileSystem::RenameDirectory>, "RenameDirectory"},
|
||||
{7, D<&IFileSystem::GetEntryType>, "GetEntryType"},
|
||||
{8, D<&IFileSystem::OpenFile>, "OpenFile"},
|
||||
{9, D<&IFileSystem::OpenDirectory>, "OpenDirectory"},
|
||||
{10, D<&IFileSystem::Commit>, "Commit"},
|
||||
{11, D<&IFileSystem::GetFreeSpaceSize>, "GetFreeSpaceSize"},
|
||||
{12, D<&IFileSystem::GetTotalSpaceSize>, "GetTotalSpaceSize"},
|
||||
{13, D<&IFileSystem::CleanDirectoryRecursively>, "CleanDirectoryRecursively"},
|
||||
{14, D<&IFileSystem::GetFileTimeStampRaw>, "GetFileTimeStampRaw"},
|
||||
{15, nullptr, "QueryEntry"},
|
||||
{16, D<&IFileSystem::GetFileSystemAttribute>, "GetFileSystemAttribute"},
|
||||
};
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
Result IFileSystem::CreateFile(const InLargeData<FileSys::Sf::Path, BufferAttr_HipcPointer> path,
|
||||
|
||||
@@ -58,7 +58,6 @@ public:
|
||||
Result GetFileSystemAttribute(Out<FileSys::FileSystemAttribute> out_attribute);
|
||||
|
||||
private:
|
||||
std::optional<FunctionInfoBase> FindRequest(u32 key) override;
|
||||
std::unique_ptr<FileSys::Fsa::IFileSystem> backend;
|
||||
SizeGetter size_getter;
|
||||
};
|
||||
|
||||
@@ -12,6 +12,11 @@ namespace Service::FileSystem {
|
||||
|
||||
IMultiCommitManager::IMultiCommitManager(Core::System& system_)
|
||||
: ServiceFramework{system_, "IMultiCommitManager"} {
|
||||
static const FunctionInfo functions[] = {
|
||||
{1, D<&IMultiCommitManager::Add>, "Add"},
|
||||
{2, D<&IMultiCommitManager::Commit>, "Commit"},
|
||||
};
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
IMultiCommitManager::~IMultiCommitManager() = default;
|
||||
|
||||
@@ -20,13 +20,6 @@ private:
|
||||
Result Add(std::shared_ptr<IFileSystem> filesystem);
|
||||
Result Commit();
|
||||
|
||||
std::optional<FunctionInfoBase> FindRequest(u32 key) override {
|
||||
return HandlerTableGenerateWithFind(key, functions);
|
||||
}
|
||||
static constexpr auto functions = CreateStaticMap(
|
||||
FunctionInfo{1, D<&IMultiCommitManager::Add>, "Add"},
|
||||
FunctionInfo{2, D<&IMultiCommitManager::Commit>, "Commit"}
|
||||
);
|
||||
FileSys::VirtualFile backend;
|
||||
};
|
||||
|
||||
|
||||
@@ -17,6 +17,11 @@ ISaveDataInfoReader::ISaveDataInfoReader(Core::System& system_,
|
||||
FileSys::SaveDataSpaceId space)
|
||||
: ServiceFramework{system_, "ISaveDataInfoReader"}, save_data_controller{
|
||||
save_data_controller_} {
|
||||
static const FunctionInfo functions[] = {
|
||||
{0, D<&ISaveDataInfoReader::ReadSaveDataInfo>, "ReadSaveDataInfo"},
|
||||
};
|
||||
RegisterHandlers(functions);
|
||||
|
||||
FindAllSaves(space);
|
||||
}
|
||||
|
||||
|
||||
@@ -45,12 +45,6 @@ private:
|
||||
void FindNormalSaves(FileSys::SaveDataSpaceId space, const FileSys::VirtualDir& type);
|
||||
void FindTemporaryStorageSaves(FileSys::SaveDataSpaceId space, const FileSys::VirtualDir& type);
|
||||
|
||||
std::optional<FunctionInfoBase> FindRequest(u32 key) override {
|
||||
return HandlerTableGenerateWithFind(key, functions);
|
||||
}
|
||||
static constexpr auto functions = CreateStaticMap(
|
||||
FunctionInfo{0, D<&ISaveDataInfoReader::ReadSaveDataInfo>, "ReadSaveDataInfo"}
|
||||
);
|
||||
std::shared_ptr<SaveDataController> save_data_controller;
|
||||
std::vector<SaveDataInfo> info;
|
||||
u64 next_entry_index = 0;
|
||||
|
||||
@@ -12,6 +12,15 @@ namespace Service::FileSystem {
|
||||
|
||||
IStorage::IStorage(Core::System& system_, FileSys::VirtualFile backend_)
|
||||
: ServiceFramework{system_, "IStorage"}, backend(std::move(backend_)) {
|
||||
static const FunctionInfo functions[] = {
|
||||
{0, D<&IStorage::Read>, "Read"},
|
||||
{1, nullptr, "Write"},
|
||||
{2, nullptr, "Flush"},
|
||||
{3, nullptr, "SetSize"},
|
||||
{4, D<&IStorage::GetSize>, "GetSize"},
|
||||
{5, nullptr, "OperateRange"},
|
||||
};
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
Result IStorage::Read(
|
||||
|
||||
@@ -18,23 +18,12 @@ public:
|
||||
explicit IStorage(Core::System& system_, FileSys::VirtualFile backend_);
|
||||
|
||||
private:
|
||||
FileSys::VirtualFile backend;
|
||||
|
||||
Result Read(
|
||||
OutBuffer<BufferAttr_HipcMapAlias | BufferAttr_HipcMapTransferAllowsNonSecure> out_bytes,
|
||||
s64 offset, s64 length);
|
||||
Result GetSize(Out<u64> out_size);
|
||||
|
||||
std::optional<FunctionInfoBase> FindRequest(u32 key) override {
|
||||
return HandlerTableGenerateWithFind(key, functions);
|
||||
}
|
||||
static constexpr auto functions = CreateStaticMap(
|
||||
FunctionInfo{0, D<&IStorage::Read>, "Read"},
|
||||
FunctionInfo{1, nullptr, "Write"},
|
||||
FunctionInfo{2, nullptr, "Flush"},
|
||||
FunctionInfo{3, nullptr, "SetSize"},
|
||||
FunctionInfo{4, D<&IStorage::GetSize>, "GetSize"},
|
||||
FunctionInfo{5, nullptr, "OperateRange"}
|
||||
);
|
||||
FileSys::VirtualFile backend;
|
||||
};
|
||||
|
||||
} // namespace Service::FileSystem
|
||||
|
||||
@@ -9,6 +9,15 @@
|
||||
namespace Service::FileSystem {
|
||||
|
||||
FSP_LDR::FSP_LDR(Core::System& system_) : ServiceFramework{system_, "fsp:ldr"} {
|
||||
// clang-format off
|
||||
static const FunctionInfo functions[] = {
|
||||
{0, nullptr, "OpenCodeFileSystem"},
|
||||
{1, nullptr, "IsArchivedProgram"},
|
||||
{2, nullptr, "SetCurrentProcess"},
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
FSP_LDR::~FSP_LDR() = default;
|
||||
|
||||
@@ -18,15 +18,6 @@ class FSP_LDR final : public ServiceFramework<FSP_LDR> {
|
||||
public:
|
||||
explicit FSP_LDR(Core::System& system_);
|
||||
~FSP_LDR() override;
|
||||
|
||||
std::optional<FunctionInfoBase> FindRequest(u32 key) override {
|
||||
return HandlerTableGenerateWithFind(key, functions);
|
||||
}
|
||||
static constexpr auto functions = CreateStaticMap(
|
||||
FunctionInfo{0, nullptr, "OpenCodeFileSystem"},
|
||||
FunctionInfo{1, nullptr, "IsArchivedProgram"},
|
||||
FunctionInfo{2, nullptr, "SetCurrentProcess"}
|
||||
);
|
||||
};
|
||||
|
||||
} // namespace Service::FileSystem
|
||||
|
||||
@@ -9,6 +9,16 @@
|
||||
namespace Service::FileSystem {
|
||||
|
||||
FSP_PR::FSP_PR(Core::System& system_) : ServiceFramework{system_, "fsp:pr"} {
|
||||
// clang-format off
|
||||
static const FunctionInfo functions[] = {
|
||||
{0, nullptr, "RegisterProgram"},
|
||||
{1, nullptr, "UnregisterProgram"},
|
||||
{2, nullptr, "SetCurrentProcess"},
|
||||
{256, nullptr, "SetEnabledProgramVerification"},
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
FSP_PR::~FSP_PR() = default;
|
||||
|
||||
@@ -18,16 +18,6 @@ class FSP_PR final : public ServiceFramework<FSP_PR> {
|
||||
public:
|
||||
explicit FSP_PR(Core::System& system_);
|
||||
~FSP_PR() override;
|
||||
|
||||
std::optional<FunctionInfoBase> FindRequest(u32 key) override {
|
||||
return HandlerTableGenerateWithFind(key, functions);
|
||||
}
|
||||
static constexpr auto functions = CreateStaticMap(
|
||||
FunctionInfo{0, nullptr, "RegisterProgram"},
|
||||
FunctionInfo{1, nullptr, "UnregisterProgram"},
|
||||
FunctionInfo{2, nullptr, "SetCurrentProcess"},
|
||||
FunctionInfo{256, nullptr, "SetEnabledProgramVerification"}
|
||||
);
|
||||
};
|
||||
|
||||
} // namespace Service::FileSystem
|
||||
|
||||
@@ -47,142 +47,143 @@
|
||||
|
||||
namespace Service::FileSystem {
|
||||
|
||||
std::optional<ServiceFrameworkBase::FunctionInfoBase> FSP_SRV::FindRequest(u32 key) {
|
||||
static constexpr auto functions = CreateStaticMap(
|
||||
FunctionInfo{0, nullptr, "OpenFileSystem"},
|
||||
FunctionInfo{1, D<&FSP_SRV::SetCurrentProcess>, "SetCurrentProcess"},
|
||||
FunctionInfo{2, D<&FSP_SRV::OpenDataFileSystemByCurrentProcess>, "OpenDataFileSystemByCurrentProcess"},
|
||||
FunctionInfo{7, D<&FSP_SRV::OpenFileSystemWithPatch>, "OpenFileSystemWithPatch"},
|
||||
FunctionInfo{8, nullptr, "OpenFileSystemWithId"},
|
||||
FunctionInfo{9, nullptr, "OpenDataFileSystemByApplicationId"},
|
||||
FunctionInfo{11, nullptr, "OpenBisFileSystem"},
|
||||
FunctionInfo{12, nullptr, "OpenBisStorage"},
|
||||
FunctionInfo{13, nullptr, "InvalidateBisCache"},
|
||||
FunctionInfo{17, nullptr, "OpenHostFileSystem"},
|
||||
FunctionInfo{18, D<&FSP_SRV::OpenSdCardFileSystem>, "OpenSdCardFileSystem"},
|
||||
FunctionInfo{19, nullptr, "FormatSdCardFileSystem"},
|
||||
FunctionInfo{21, nullptr, "DeleteSaveDataFileSystem"},
|
||||
FunctionInfo{22, D<&FSP_SRV::CreateSaveDataFileSystem>, "CreateSaveDataFileSystem"},
|
||||
FunctionInfo{23, D<&FSP_SRV::CreateSaveDataFileSystemBySystemSaveDataId>, "CreateSaveDataFileSystemBySystemSaveDataId"},
|
||||
FunctionInfo{24, nullptr, "RegisterSaveDataFileSystemAtomicDeletion"},
|
||||
FunctionInfo{25, nullptr, "DeleteSaveDataFileSystemBySaveDataSpaceId"},
|
||||
FunctionInfo{26, nullptr, "FormatSdCardDryRun"},
|
||||
FunctionInfo{27, D<&FSP_SRV::IsExFatSupported>, "IsExFatSupported"},
|
||||
FunctionInfo{28, nullptr, "DeleteSaveDataFileSystemBySaveDataAttribute"},
|
||||
FunctionInfo{30, nullptr, "OpenGameCardStorage"},
|
||||
FunctionInfo{31, nullptr, "OpenGameCardFileSystem"},
|
||||
FunctionInfo{32, D<&FSP_SRV::ExtendSaveDataFileSystem>, "ExtendSaveDataFileSystem"},
|
||||
FunctionInfo{33, nullptr, "DeleteCacheStorage"},
|
||||
FunctionInfo{34, D<&FSP_SRV::GetCacheStorageSize>, "GetCacheStorageSize"},
|
||||
FunctionInfo{35, nullptr, "CreateSaveDataFileSystemByHashSalt"},
|
||||
FunctionInfo{36, nullptr, "OpenHostFileSystemWithOption"},
|
||||
FunctionInfo{37, D<&FSP_SRV::CreateSaveDataFileSystemWithCreationInfo2>, "CreateSaveDataFileSystemWithCreationInfo2"},
|
||||
FunctionInfo{51, D<&FSP_SRV::OpenSaveDataFileSystem>, "OpenSaveDataFileSystem"},
|
||||
FunctionInfo{52, D<&FSP_SRV::OpenSaveDataFileSystemBySystemSaveDataId>, "OpenSaveDataFileSystemBySystemSaveDataId"},
|
||||
FunctionInfo{53, D<&FSP_SRV::OpenReadOnlySaveDataFileSystem>, "OpenReadOnlySaveDataFileSystem"},
|
||||
FunctionInfo{57, D<&FSP_SRV::ReadSaveDataFileSystemExtraDataBySaveDataSpaceId>, "ReadSaveDataFileSystemExtraDataBySaveDataSpaceId"},
|
||||
FunctionInfo{58, D<&FSP_SRV::ReadSaveDataFileSystemExtraData>, "ReadSaveDataFileSystemExtraData"},
|
||||
FunctionInfo{59, D<&FSP_SRV::WriteSaveDataFileSystemExtraData>, "WriteSaveDataFileSystemExtraData"},
|
||||
FunctionInfo{60, nullptr, "OpenSaveDataInfoReader"},
|
||||
FunctionInfo{61, D<&FSP_SRV::OpenSaveDataInfoReaderBySaveDataSpaceId>, "OpenSaveDataInfoReaderBySaveDataSpaceId"},
|
||||
FunctionInfo{62, D<&FSP_SRV::OpenSaveDataInfoReaderOnlyCacheStorage>, "OpenSaveDataInfoReaderOnlyCacheStorage"},
|
||||
FunctionInfo{64, nullptr, "OpenSaveDataInternalStorageFileSystem"},
|
||||
FunctionInfo{65, nullptr, "UpdateSaveDataMacForDebug"},
|
||||
FunctionInfo{66, nullptr, "WriteSaveDataFileSystemExtraData2"},
|
||||
FunctionInfo{67, D<&FSP_SRV::FindSaveDataWithFilter>, "FindSaveDataWithFilter"},
|
||||
FunctionInfo{68, nullptr, "OpenSaveDataInfoReaderBySaveDataFilter"},
|
||||
FunctionInfo{69, D<&FSP_SRV::ReadSaveDataFileSystemExtraDataBySaveDataAttribute>, "ReadSaveDataFileSystemExtraDataBySaveDataAttribute"},
|
||||
FunctionInfo{70, D<&FSP_SRV::WriteSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute>, "WriteSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute"},
|
||||
FunctionInfo{71, D<&FSP_SRV::ReadSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute>, "ReadSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute"},
|
||||
FunctionInfo{80, nullptr, "OpenSaveDataMetaFile"},
|
||||
FunctionInfo{81, nullptr, "OpenSaveDataTransferManager"},
|
||||
FunctionInfo{82, nullptr, "OpenSaveDataTransferManagerVersion2"},
|
||||
FunctionInfo{83, D<&FSP_SRV::OpenSaveDataTransferProhibiter>, "OpenSaveDataTransferProhibiter"},
|
||||
FunctionInfo{84, nullptr, "ListApplicationAccessibleSaveDataOwnerId"},
|
||||
FunctionInfo{85, nullptr, "OpenSaveDataTransferManagerForSaveDataRepair"},
|
||||
FunctionInfo{86, nullptr, "OpenSaveDataMover"},
|
||||
FunctionInfo{87, nullptr, "OpenSaveDataTransferManagerForRepair"},
|
||||
FunctionInfo{100, nullptr, "OpenImageDirectoryFileSystem"},
|
||||
FunctionInfo{101, nullptr, "OpenBaseFileSystem"},
|
||||
FunctionInfo{102, nullptr, "FormatBaseFileSystem"},
|
||||
FunctionInfo{110, nullptr, "OpenContentStorageFileSystem"},
|
||||
FunctionInfo{120, nullptr, "OpenCloudBackupWorkStorageFileSystem"},
|
||||
FunctionInfo{130, nullptr, "OpenCustomStorageFileSystem"},
|
||||
FunctionInfo{200, D<&FSP_SRV::OpenDataStorageByCurrentProcess>, "OpenDataStorageByCurrentProcess"},
|
||||
FunctionInfo{201, nullptr, "OpenDataStorageByProgramId"},
|
||||
FunctionInfo{202, D<&FSP_SRV::OpenDataStorageByDataId>, "OpenDataStorageByDataId"},
|
||||
FunctionInfo{203, D<&FSP_SRV::OpenPatchDataStorageByCurrentProcess>, "OpenPatchDataStorageByCurrentProcess"},
|
||||
FunctionInfo{204, nullptr, "OpenDataFileSystemByProgramIndex"},
|
||||
FunctionInfo{205, D<&FSP_SRV::OpenDataStorageWithProgramIndex>, "OpenDataStorageWithProgramIndex"},
|
||||
FunctionInfo{206, nullptr, "OpenDataStorageByPath"},
|
||||
FunctionInfo{210, D<&FSP_SRV::SetCurrentProcess>, "SetCurrentProcess"},
|
||||
FunctionInfo{400, nullptr, "OpenDeviceOperator"},
|
||||
FunctionInfo{500, nullptr, "OpenSdCardDetectionEventNotifier"},
|
||||
FunctionInfo{501, nullptr, "OpenGameCardDetectionEventNotifier"},
|
||||
FunctionInfo{510, nullptr, "OpenSystemDataUpdateEventNotifier"},
|
||||
FunctionInfo{511, nullptr, "NotifySystemDataUpdateEvent"},
|
||||
FunctionInfo{520, nullptr, "SimulateGameCardDetectionEvent"},
|
||||
FunctionInfo{600, nullptr, "SetCurrentPosixTime"},
|
||||
FunctionInfo{601, nullptr, "QuerySaveDataTotalSize"},
|
||||
FunctionInfo{602, nullptr, "VerifySaveDataFileSystem"},
|
||||
FunctionInfo{603, nullptr, "CorruptSaveDataFileSystem"},
|
||||
FunctionInfo{604, nullptr, "CreatePaddingFile"},
|
||||
FunctionInfo{605, nullptr, "DeleteAllPaddingFiles"},
|
||||
FunctionInfo{606, nullptr, "GetRightsId"},
|
||||
FunctionInfo{607, nullptr, "RegisterExternalKey"},
|
||||
FunctionInfo{608, nullptr, "UnregisterAllExternalKey"},
|
||||
FunctionInfo{609, nullptr, "GetRightsIdByPath"},
|
||||
FunctionInfo{610, nullptr, "GetRightsIdAndKeyGenerationByPath"},
|
||||
FunctionInfo{611, nullptr, "SetCurrentPosixTimeWithTimeDifference"},
|
||||
FunctionInfo{612, nullptr, "GetFreeSpaceSizeForSaveData"},
|
||||
FunctionInfo{613, nullptr, "VerifySaveDataFileSystemBySaveDataSpaceId"},
|
||||
FunctionInfo{614, nullptr, "CorruptSaveDataFileSystemBySaveDataSpaceId"},
|
||||
FunctionInfo{615, nullptr, "QuerySaveDataInternalStorageTotalSize"},
|
||||
FunctionInfo{616, nullptr, "GetSaveDataCommitId"},
|
||||
FunctionInfo{617, nullptr, "UnregisterExternalKey"},
|
||||
FunctionInfo{620, nullptr, "SetSdCardEncryptionSeed"},
|
||||
FunctionInfo{630, nullptr, "SetSdCardAccessibility"},
|
||||
FunctionInfo{631, D<&FSP_SRV::IsSdCardAccessible>, "IsSdCardAccessible"},
|
||||
FunctionInfo{640, nullptr, "IsSignedSystemPartitionOnSdCardValid"},
|
||||
FunctionInfo{700, nullptr, "OpenAccessFailureResolver"},
|
||||
FunctionInfo{701, nullptr, "GetAccessFailureDetectionEvent"},
|
||||
FunctionInfo{702, nullptr, "IsAccessFailureDetected"},
|
||||
FunctionInfo{710, nullptr, "ResolveAccessFailure"},
|
||||
FunctionInfo{720, nullptr, "AbandonAccessFailure"},
|
||||
FunctionInfo{800, nullptr, "GetAndClearFileSystemProxyErrorInfo"},
|
||||
FunctionInfo{810, nullptr, "RegisterProgramIndexMapInfo"},
|
||||
FunctionInfo{820, nullptr, "GetContentStorageInfoIndex"},
|
||||
FunctionInfo{830, nullptr, "EncryptStreamPlaySaveData"},
|
||||
FunctionInfo{831, nullptr, "DecryptStreamPlaySaveData"},
|
||||
FunctionInfo{1000, nullptr, "SetBisRootForHost"},
|
||||
FunctionInfo{1001, nullptr, "SetSaveDataSize"},
|
||||
FunctionInfo{1002, nullptr, "SetSaveDataRootPath"},
|
||||
FunctionInfo{1003, D<&FSP_SRV::DisableAutoSaveDataCreation>, "DisableAutoSaveDataCreation"},
|
||||
FunctionInfo{1004, D<&FSP_SRV::SetGlobalAccessLogMode>, "SetGlobalAccessLogMode"},
|
||||
FunctionInfo{1005, D<&FSP_SRV::GetGlobalAccessLogMode>, "GetGlobalAccessLogMode"},
|
||||
FunctionInfo{1006, D<&FSP_SRV::OutputAccessLogToSdCard>, "OutputAccessLogToSdCard"},
|
||||
FunctionInfo{1007, nullptr, "RegisterUpdatePartition"},
|
||||
FunctionInfo{1008, nullptr, "OpenRegisteredUpdatePartition"},
|
||||
FunctionInfo{1009, nullptr, "GetAndClearMemoryReportInfo"},
|
||||
FunctionInfo{1010, nullptr, "SetDataStorageRedirectTarget"},
|
||||
FunctionInfo{1011, D<&FSP_SRV::GetProgramIndexForAccessLog>, "GetProgramIndexForAccessLog"},
|
||||
FunctionInfo{1012, nullptr, "GetFsStackUsage"},
|
||||
FunctionInfo{1013, nullptr, "UnsetSaveDataRootPath"},
|
||||
FunctionInfo{1014, nullptr, "OutputMultiProgramTagAccessLog"},
|
||||
FunctionInfo{1016, D<&FSP_SRV::FlushAccessLogOnSdCard>, "FlushAccessLogOnSdCard"},
|
||||
FunctionInfo{1017, nullptr, "OutputApplicationInfoAccessLog"},
|
||||
FunctionInfo{1018, nullptr, "SetDebugOption"},
|
||||
FunctionInfo{1019, nullptr, "UnsetDebugOption"},
|
||||
FunctionInfo{1100, nullptr, "OverrideSaveDataTransferTokenSignVerificationKey"},
|
||||
FunctionInfo{1110, nullptr, "CorruptSaveDataFileSystemBySaveDataSpaceId2"},
|
||||
FunctionInfo{1200, D<&FSP_SRV::OpenMultiCommitManager>, "OpenMultiCommitManager"},
|
||||
FunctionInfo{1300, nullptr, "OpenBisWiper"}
|
||||
);
|
||||
return HandlerTableGenerateWithFind(key, functions);
|
||||
}
|
||||
|
||||
FSP_SRV::FSP_SRV(Core::System& system_)
|
||||
: ServiceFramework{system_, "fsp-srv"}, fsc{system.GetFileSystemController()}, content_provider{system.GetContentProvider()}, reporter{system.GetReporter()} {
|
||||
: ServiceFramework{system_, "fsp-srv"}, fsc{system.GetFileSystemController()},
|
||||
content_provider{system.GetContentProvider()}, reporter{system.GetReporter()} {
|
||||
// clang-format off
|
||||
static const FunctionInfo functions[] = {
|
||||
{0, nullptr, "OpenFileSystem"},
|
||||
{1, D<&FSP_SRV::SetCurrentProcess>, "SetCurrentProcess"},
|
||||
{2, D<&FSP_SRV::OpenDataFileSystemByCurrentProcess>, "OpenDataFileSystemByCurrentProcess"},
|
||||
{7, D<&FSP_SRV::OpenFileSystemWithPatch>, "OpenFileSystemWithPatch"},
|
||||
{8, nullptr, "OpenFileSystemWithId"},
|
||||
{9, nullptr, "OpenDataFileSystemByApplicationId"},
|
||||
{11, nullptr, "OpenBisFileSystem"},
|
||||
{12, nullptr, "OpenBisStorage"},
|
||||
{13, nullptr, "InvalidateBisCache"},
|
||||
{17, nullptr, "OpenHostFileSystem"},
|
||||
{18, D<&FSP_SRV::OpenSdCardFileSystem>, "OpenSdCardFileSystem"},
|
||||
{19, nullptr, "FormatSdCardFileSystem"},
|
||||
{21, nullptr, "DeleteSaveDataFileSystem"},
|
||||
{22, D<&FSP_SRV::CreateSaveDataFileSystem>, "CreateSaveDataFileSystem"},
|
||||
{23, D<&FSP_SRV::CreateSaveDataFileSystemBySystemSaveDataId>, "CreateSaveDataFileSystemBySystemSaveDataId"},
|
||||
{24, nullptr, "RegisterSaveDataFileSystemAtomicDeletion"},
|
||||
{25, nullptr, "DeleteSaveDataFileSystemBySaveDataSpaceId"},
|
||||
{26, nullptr, "FormatSdCardDryRun"},
|
||||
{27, D<&FSP_SRV::IsExFatSupported>, "IsExFatSupported"},
|
||||
{28, nullptr, "DeleteSaveDataFileSystemBySaveDataAttribute"},
|
||||
{30, nullptr, "OpenGameCardStorage"},
|
||||
{31, nullptr, "OpenGameCardFileSystem"},
|
||||
{32, D<&FSP_SRV::ExtendSaveDataFileSystem>, "ExtendSaveDataFileSystem"},
|
||||
{33, nullptr, "DeleteCacheStorage"},
|
||||
{34, D<&FSP_SRV::GetCacheStorageSize>, "GetCacheStorageSize"},
|
||||
{35, nullptr, "CreateSaveDataFileSystemByHashSalt"},
|
||||
{36, nullptr, "OpenHostFileSystemWithOption"},
|
||||
{37, D<&FSP_SRV::CreateSaveDataFileSystemWithCreationInfo2>, "CreateSaveDataFileSystemWithCreationInfo2"},
|
||||
{51, D<&FSP_SRV::OpenSaveDataFileSystem>, "OpenSaveDataFileSystem"},
|
||||
{52, D<&FSP_SRV::OpenSaveDataFileSystemBySystemSaveDataId>, "OpenSaveDataFileSystemBySystemSaveDataId"},
|
||||
{53, D<&FSP_SRV::OpenReadOnlySaveDataFileSystem>, "OpenReadOnlySaveDataFileSystem"},
|
||||
{57, D<&FSP_SRV::ReadSaveDataFileSystemExtraDataBySaveDataSpaceId>, "ReadSaveDataFileSystemExtraDataBySaveDataSpaceId"},
|
||||
{58, D<&FSP_SRV::ReadSaveDataFileSystemExtraData>, "ReadSaveDataFileSystemExtraData"},
|
||||
{59, D<&FSP_SRV::WriteSaveDataFileSystemExtraData>, "WriteSaveDataFileSystemExtraData"},
|
||||
{60, nullptr, "OpenSaveDataInfoReader"},
|
||||
{61, D<&FSP_SRV::OpenSaveDataInfoReaderBySaveDataSpaceId>, "OpenSaveDataInfoReaderBySaveDataSpaceId"},
|
||||
{62, D<&FSP_SRV::OpenSaveDataInfoReaderOnlyCacheStorage>, "OpenSaveDataInfoReaderOnlyCacheStorage"},
|
||||
{64, nullptr, "OpenSaveDataInternalStorageFileSystem"},
|
||||
{65, nullptr, "UpdateSaveDataMacForDebug"},
|
||||
{66, nullptr, "WriteSaveDataFileSystemExtraData2"},
|
||||
{67, D<&FSP_SRV::FindSaveDataWithFilter>, "FindSaveDataWithFilter"},
|
||||
{68, nullptr, "OpenSaveDataInfoReaderBySaveDataFilter"},
|
||||
{69, D<&FSP_SRV::ReadSaveDataFileSystemExtraDataBySaveDataAttribute>, "ReadSaveDataFileSystemExtraDataBySaveDataAttribute"},
|
||||
{70, D<&FSP_SRV::WriteSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute>, "WriteSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute"},
|
||||
{71, D<&FSP_SRV::ReadSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute>, "ReadSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute"},
|
||||
{80, nullptr, "OpenSaveDataMetaFile"},
|
||||
{81, nullptr, "OpenSaveDataTransferManager"},
|
||||
{82, nullptr, "OpenSaveDataTransferManagerVersion2"},
|
||||
{83, D<&FSP_SRV::OpenSaveDataTransferProhibiter>, "OpenSaveDataTransferProhibiter"},
|
||||
{84, nullptr, "ListApplicationAccessibleSaveDataOwnerId"},
|
||||
{85, nullptr, "OpenSaveDataTransferManagerForSaveDataRepair"},
|
||||
{86, nullptr, "OpenSaveDataMover"},
|
||||
{87, nullptr, "OpenSaveDataTransferManagerForRepair"},
|
||||
{100, nullptr, "OpenImageDirectoryFileSystem"},
|
||||
{101, nullptr, "OpenBaseFileSystem"},
|
||||
{102, nullptr, "FormatBaseFileSystem"},
|
||||
{110, nullptr, "OpenContentStorageFileSystem"},
|
||||
{120, nullptr, "OpenCloudBackupWorkStorageFileSystem"},
|
||||
{130, nullptr, "OpenCustomStorageFileSystem"},
|
||||
{200, D<&FSP_SRV::OpenDataStorageByCurrentProcess>, "OpenDataStorageByCurrentProcess"},
|
||||
{201, nullptr, "OpenDataStorageByProgramId"},
|
||||
{202, D<&FSP_SRV::OpenDataStorageByDataId>, "OpenDataStorageByDataId"},
|
||||
{203, D<&FSP_SRV::OpenPatchDataStorageByCurrentProcess>, "OpenPatchDataStorageByCurrentProcess"},
|
||||
{204, nullptr, "OpenDataFileSystemByProgramIndex"},
|
||||
{205, D<&FSP_SRV::OpenDataStorageWithProgramIndex>, "OpenDataStorageWithProgramIndex"},
|
||||
{206, nullptr, "OpenDataStorageByPath"},
|
||||
{210, D<&FSP_SRV::SetCurrentProcess>, "SetCurrentProcess"},
|
||||
{400, nullptr, "OpenDeviceOperator"},
|
||||
{500, nullptr, "OpenSdCardDetectionEventNotifier"},
|
||||
{501, nullptr, "OpenGameCardDetectionEventNotifier"},
|
||||
{510, nullptr, "OpenSystemDataUpdateEventNotifier"},
|
||||
{511, nullptr, "NotifySystemDataUpdateEvent"},
|
||||
{520, nullptr, "SimulateGameCardDetectionEvent"},
|
||||
{600, nullptr, "SetCurrentPosixTime"},
|
||||
{601, nullptr, "QuerySaveDataTotalSize"},
|
||||
{602, nullptr, "VerifySaveDataFileSystem"},
|
||||
{603, nullptr, "CorruptSaveDataFileSystem"},
|
||||
{604, nullptr, "CreatePaddingFile"},
|
||||
{605, nullptr, "DeleteAllPaddingFiles"},
|
||||
{606, nullptr, "GetRightsId"},
|
||||
{607, nullptr, "RegisterExternalKey"},
|
||||
{608, nullptr, "UnregisterAllExternalKey"},
|
||||
{609, nullptr, "GetRightsIdByPath"},
|
||||
{610, nullptr, "GetRightsIdAndKeyGenerationByPath"},
|
||||
{611, nullptr, "SetCurrentPosixTimeWithTimeDifference"},
|
||||
{612, nullptr, "GetFreeSpaceSizeForSaveData"},
|
||||
{613, nullptr, "VerifySaveDataFileSystemBySaveDataSpaceId"},
|
||||
{614, nullptr, "CorruptSaveDataFileSystemBySaveDataSpaceId"},
|
||||
{615, nullptr, "QuerySaveDataInternalStorageTotalSize"},
|
||||
{616, nullptr, "GetSaveDataCommitId"},
|
||||
{617, nullptr, "UnregisterExternalKey"},
|
||||
{620, nullptr, "SetSdCardEncryptionSeed"},
|
||||
{630, nullptr, "SetSdCardAccessibility"},
|
||||
{631, D<&FSP_SRV::IsSdCardAccessible>, "IsSdCardAccessible"},
|
||||
{640, nullptr, "IsSignedSystemPartitionOnSdCardValid"},
|
||||
{700, nullptr, "OpenAccessFailureResolver"},
|
||||
{701, nullptr, "GetAccessFailureDetectionEvent"},
|
||||
{702, nullptr, "IsAccessFailureDetected"},
|
||||
{710, nullptr, "ResolveAccessFailure"},
|
||||
{720, nullptr, "AbandonAccessFailure"},
|
||||
{800, nullptr, "GetAndClearFileSystemProxyErrorInfo"},
|
||||
{810, nullptr, "RegisterProgramIndexMapInfo"},
|
||||
{820, nullptr, "GetContentStorageInfoIndex"},
|
||||
{830, nullptr, "EncryptStreamPlaySaveData"},
|
||||
{831, nullptr, "DecryptStreamPlaySaveData"},
|
||||
{1000, nullptr, "SetBisRootForHost"},
|
||||
{1001, nullptr, "SetSaveDataSize"},
|
||||
{1002, nullptr, "SetSaveDataRootPath"},
|
||||
{1003, D<&FSP_SRV::DisableAutoSaveDataCreation>, "DisableAutoSaveDataCreation"},
|
||||
{1004, D<&FSP_SRV::SetGlobalAccessLogMode>, "SetGlobalAccessLogMode"},
|
||||
{1005, D<&FSP_SRV::GetGlobalAccessLogMode>, "GetGlobalAccessLogMode"},
|
||||
{1006, D<&FSP_SRV::OutputAccessLogToSdCard>, "OutputAccessLogToSdCard"},
|
||||
{1007, nullptr, "RegisterUpdatePartition"},
|
||||
{1008, nullptr, "OpenRegisteredUpdatePartition"},
|
||||
{1009, nullptr, "GetAndClearMemoryReportInfo"},
|
||||
{1010, nullptr, "SetDataStorageRedirectTarget"},
|
||||
{1011, D<&FSP_SRV::GetProgramIndexForAccessLog>, "GetProgramIndexForAccessLog"},
|
||||
{1012, nullptr, "GetFsStackUsage"},
|
||||
{1013, nullptr, "UnsetSaveDataRootPath"},
|
||||
{1014, nullptr, "OutputMultiProgramTagAccessLog"},
|
||||
{1016, D<&FSP_SRV::FlushAccessLogOnSdCard>, "FlushAccessLogOnSdCard"},
|
||||
{1017, nullptr, "OutputApplicationInfoAccessLog"},
|
||||
{1018, nullptr, "SetDebugOption"},
|
||||
{1019, nullptr, "UnsetDebugOption"},
|
||||
{1100, nullptr, "OverrideSaveDataTransferTokenSignVerificationKey"},
|
||||
{1110, nullptr, "CorruptSaveDataFileSystemBySaveDataSpaceId2"},
|
||||
{1200, D<&FSP_SRV::OpenMultiCommitManager>, "OpenMultiCommitManager"},
|
||||
{1300, nullptr, "OpenBisWiper"},
|
||||
};
|
||||
// clang-format on
|
||||
RegisterHandlers(functions);
|
||||
|
||||
if (Settings::values.enable_fs_access_log) {
|
||||
access_log_mode = AccessLogMode::SdCard;
|
||||
}
|
||||
|
||||
@@ -115,7 +115,6 @@ private:
|
||||
s64 available_size, s64 journal_size);
|
||||
Result GetCacheStorageSize(s32 index, Out<s64> out_data_size, Out<s64> out_journal_size);
|
||||
|
||||
std::optional<FunctionInfoBase> FindRequest(u32 key) override;
|
||||
FileSystemController& fsc;
|
||||
const FileSys::ContentProvider& content_provider;
|
||||
const Core::Reporter& reporter;
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
|
||||
Reference in New Issue
Block a user