|
|
@ -27,8 +27,11 @@
|
|
|
|
#include "core/file_sys/system_archive/system_archive.h"
|
|
|
|
#include "core/file_sys/system_archive/system_archive.h"
|
|
|
|
#include "core/file_sys/vfs/vfs.h"
|
|
|
|
#include "core/file_sys/vfs/vfs.h"
|
|
|
|
#include "core/hle/result.h"
|
|
|
|
#include "core/hle/result.h"
|
|
|
|
|
|
|
|
#include "core/hle/service/cmif_serialization.h"
|
|
|
|
#include "core/hle/service/filesystem/filesystem.h"
|
|
|
|
#include "core/hle/service/filesystem/filesystem.h"
|
|
|
|
#include "core/hle/service/filesystem/fsp/fs_i_filesystem.h"
|
|
|
|
#include "core/hle/service/filesystem/fsp/fs_i_filesystem.h"
|
|
|
|
|
|
|
|
#include "core/hle/service/filesystem/fsp/fs_i_multi_commit_manager.h"
|
|
|
|
|
|
|
|
#include "core/hle/service/filesystem/fsp/fs_i_save_data_info_reader.h"
|
|
|
|
#include "core/hle/service/filesystem/fsp/fs_i_storage.h"
|
|
|
|
#include "core/hle/service/filesystem/fsp/fs_i_storage.h"
|
|
|
|
#include "core/hle/service/filesystem/fsp/fsp_srv.h"
|
|
|
|
#include "core/hle/service/filesystem/fsp/fsp_srv.h"
|
|
|
|
#include "core/hle/service/filesystem/romfs_controller.h"
|
|
|
|
#include "core/hle/service/filesystem/romfs_controller.h"
|
|
|
@ -39,182 +42,6 @@
|
|
|
|
#include "core/reporter.h"
|
|
|
|
#include "core/reporter.h"
|
|
|
|
|
|
|
|
|
|
|
|
namespace Service::FileSystem {
|
|
|
|
namespace Service::FileSystem {
|
|
|
|
enum class FileSystemProxyType : u8 {
|
|
|
|
|
|
|
|
Code = 0,
|
|
|
|
|
|
|
|
Rom = 1,
|
|
|
|
|
|
|
|
Logo = 2,
|
|
|
|
|
|
|
|
Control = 3,
|
|
|
|
|
|
|
|
Manual = 4,
|
|
|
|
|
|
|
|
Meta = 5,
|
|
|
|
|
|
|
|
Data = 6,
|
|
|
|
|
|
|
|
Package = 7,
|
|
|
|
|
|
|
|
RegisteredUpdate = 8,
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class ISaveDataInfoReader final : public ServiceFramework<ISaveDataInfoReader> {
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
explicit ISaveDataInfoReader(Core::System& system_,
|
|
|
|
|
|
|
|
std::shared_ptr<SaveDataController> save_data_controller_,
|
|
|
|
|
|
|
|
FileSys::SaveDataSpaceId space)
|
|
|
|
|
|
|
|
: ServiceFramework{system_, "ISaveDataInfoReader"}, save_data_controller{
|
|
|
|
|
|
|
|
save_data_controller_} {
|
|
|
|
|
|
|
|
static const FunctionInfo functions[] = {
|
|
|
|
|
|
|
|
{0, &ISaveDataInfoReader::ReadSaveDataInfo, "ReadSaveDataInfo"},
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
RegisterHandlers(functions);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FindAllSaves(space);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void ReadSaveDataInfo(HLERequestContext& ctx) {
|
|
|
|
|
|
|
|
LOG_DEBUG(Service_FS, "called");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Calculate how many entries we can fit in the output buffer
|
|
|
|
|
|
|
|
const u64 count_entries = ctx.GetWriteBufferNumElements<SaveDataInfo>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Cap at total number of entries.
|
|
|
|
|
|
|
|
const u64 actual_entries = std::min(count_entries, info.size() - next_entry_index);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Determine data start and end
|
|
|
|
|
|
|
|
const auto* begin = reinterpret_cast<u8*>(info.data() + next_entry_index);
|
|
|
|
|
|
|
|
const auto* end = reinterpret_cast<u8*>(info.data() + next_entry_index + actual_entries);
|
|
|
|
|
|
|
|
const auto range_size = static_cast<std::size_t>(std::distance(begin, end));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
next_entry_index += actual_entries;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Write the data to memory
|
|
|
|
|
|
|
|
ctx.WriteBuffer(begin, range_size);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 4};
|
|
|
|
|
|
|
|
rb.Push(ResultSuccess);
|
|
|
|
|
|
|
|
rb.Push<u64>(actual_entries);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
static u64 stoull_be(std::string_view str) {
|
|
|
|
|
|
|
|
if (str.size() != 16)
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const auto bytes = Common::HexStringToArray<0x8>(str);
|
|
|
|
|
|
|
|
u64 out{};
|
|
|
|
|
|
|
|
std::memcpy(&out, bytes.data(), sizeof(u64));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return Common::swap64(out);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void FindAllSaves(FileSys::SaveDataSpaceId space) {
|
|
|
|
|
|
|
|
FileSys::VirtualDir save_root{};
|
|
|
|
|
|
|
|
const auto result = save_data_controller->OpenSaveDataSpace(&save_root, space);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (result != ResultSuccess || save_root == nullptr) {
|
|
|
|
|
|
|
|
LOG_ERROR(Service_FS, "The save root for the space_id={:02X} was invalid!", space);
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (const auto& type : save_root->GetSubdirectories()) {
|
|
|
|
|
|
|
|
if (type->GetName() == "save") {
|
|
|
|
|
|
|
|
for (const auto& save_id : type->GetSubdirectories()) {
|
|
|
|
|
|
|
|
for (const auto& user_id : save_id->GetSubdirectories()) {
|
|
|
|
|
|
|
|
// Skip non user id subdirectories
|
|
|
|
|
|
|
|
if (user_id->GetName().size() != 0x20) {
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const auto save_id_numeric = stoull_be(save_id->GetName());
|
|
|
|
|
|
|
|
auto user_id_numeric = Common::HexStringToArray<0x10>(user_id->GetName());
|
|
|
|
|
|
|
|
std::reverse(user_id_numeric.begin(), user_id_numeric.end());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (save_id_numeric != 0) {
|
|
|
|
|
|
|
|
// System Save Data
|
|
|
|
|
|
|
|
info.emplace_back(SaveDataInfo{
|
|
|
|
|
|
|
|
0,
|
|
|
|
|
|
|
|
space,
|
|
|
|
|
|
|
|
FileSys::SaveDataType::SystemSaveData,
|
|
|
|
|
|
|
|
{},
|
|
|
|
|
|
|
|
user_id_numeric,
|
|
|
|
|
|
|
|
save_id_numeric,
|
|
|
|
|
|
|
|
0,
|
|
|
|
|
|
|
|
user_id->GetSize(),
|
|
|
|
|
|
|
|
{},
|
|
|
|
|
|
|
|
{},
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (const auto& title_id : user_id->GetSubdirectories()) {
|
|
|
|
|
|
|
|
const auto device =
|
|
|
|
|
|
|
|
std::all_of(user_id_numeric.begin(), user_id_numeric.end(),
|
|
|
|
|
|
|
|
[](u8 val) { return val == 0; });
|
|
|
|
|
|
|
|
info.emplace_back(SaveDataInfo{
|
|
|
|
|
|
|
|
0,
|
|
|
|
|
|
|
|
space,
|
|
|
|
|
|
|
|
device ? FileSys::SaveDataType::DeviceSaveData
|
|
|
|
|
|
|
|
: FileSys::SaveDataType::SaveData,
|
|
|
|
|
|
|
|
{},
|
|
|
|
|
|
|
|
user_id_numeric,
|
|
|
|
|
|
|
|
save_id_numeric,
|
|
|
|
|
|
|
|
stoull_be(title_id->GetName()),
|
|
|
|
|
|
|
|
title_id->GetSize(),
|
|
|
|
|
|
|
|
{},
|
|
|
|
|
|
|
|
{},
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else if (space == FileSys::SaveDataSpaceId::TemporaryStorage) {
|
|
|
|
|
|
|
|
// Temporary Storage
|
|
|
|
|
|
|
|
for (const auto& user_id : type->GetSubdirectories()) {
|
|
|
|
|
|
|
|
// Skip non user id subdirectories
|
|
|
|
|
|
|
|
if (user_id->GetName().size() != 0x20) {
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
for (const auto& title_id : user_id->GetSubdirectories()) {
|
|
|
|
|
|
|
|
if (!title_id->GetFiles().empty() ||
|
|
|
|
|
|
|
|
!title_id->GetSubdirectories().empty()) {
|
|
|
|
|
|
|
|
auto user_id_numeric =
|
|
|
|
|
|
|
|
Common::HexStringToArray<0x10>(user_id->GetName());
|
|
|
|
|
|
|
|
std::reverse(user_id_numeric.begin(), user_id_numeric.end());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
info.emplace_back(SaveDataInfo{
|
|
|
|
|
|
|
|
0,
|
|
|
|
|
|
|
|
space,
|
|
|
|
|
|
|
|
FileSys::SaveDataType::TemporaryStorage,
|
|
|
|
|
|
|
|
{},
|
|
|
|
|
|
|
|
user_id_numeric,
|
|
|
|
|
|
|
|
stoull_be(type->GetName()),
|
|
|
|
|
|
|
|
stoull_be(title_id->GetName()),
|
|
|
|
|
|
|
|
title_id->GetSize(),
|
|
|
|
|
|
|
|
{},
|
|
|
|
|
|
|
|
{},
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
struct SaveDataInfo {
|
|
|
|
|
|
|
|
u64_le save_id_unknown;
|
|
|
|
|
|
|
|
FileSys::SaveDataSpaceId space;
|
|
|
|
|
|
|
|
FileSys::SaveDataType type;
|
|
|
|
|
|
|
|
INSERT_PADDING_BYTES(0x6);
|
|
|
|
|
|
|
|
std::array<u8, 0x10> user_id;
|
|
|
|
|
|
|
|
u64_le save_id;
|
|
|
|
|
|
|
|
u64_le title_id;
|
|
|
|
|
|
|
|
u64_le save_image_size;
|
|
|
|
|
|
|
|
u16_le index;
|
|
|
|
|
|
|
|
FileSys::SaveDataRank rank;
|
|
|
|
|
|
|
|
INSERT_PADDING_BYTES(0x25);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
static_assert(sizeof(SaveDataInfo) == 0x60, "SaveDataInfo has incorrect size.");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ProcessId process_id = 0;
|
|
|
|
|
|
|
|
std::shared_ptr<SaveDataController> save_data_controller;
|
|
|
|
|
|
|
|
std::vector<SaveDataInfo> info;
|
|
|
|
|
|
|
|
u64 next_entry_index = 0;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FSP_SRV::FSP_SRV(Core::System& system_)
|
|
|
|
FSP_SRV::FSP_SRV(Core::System& system_)
|
|
|
|
: ServiceFramework{system_, "fsp-srv"}, fsc{system.GetFileSystemController()},
|
|
|
|
: ServiceFramework{system_, "fsp-srv"}, fsc{system.GetFileSystemController()},
|
|
|
@ -222,20 +49,20 @@ FSP_SRV::FSP_SRV(Core::System& system_)
|
|
|
|
// clang-format off
|
|
|
|
// clang-format off
|
|
|
|
static const FunctionInfo functions[] = {
|
|
|
|
static const FunctionInfo functions[] = {
|
|
|
|
{0, nullptr, "OpenFileSystem"},
|
|
|
|
{0, nullptr, "OpenFileSystem"},
|
|
|
|
{1, &FSP_SRV::SetCurrentProcess, "SetCurrentProcess"},
|
|
|
|
{1, D<&FSP_SRV::SetCurrentProcess>, "SetCurrentProcess"},
|
|
|
|
{2, nullptr, "OpenDataFileSystemByCurrentProcess"},
|
|
|
|
{2, nullptr, "OpenDataFileSystemByCurrentProcess"},
|
|
|
|
{7, &FSP_SRV::OpenFileSystemWithPatch, "OpenFileSystemWithPatch"},
|
|
|
|
{7, D<&FSP_SRV::OpenFileSystemWithPatch>, "OpenFileSystemWithPatch"},
|
|
|
|
{8, nullptr, "OpenFileSystemWithId"},
|
|
|
|
{8, nullptr, "OpenFileSystemWithId"},
|
|
|
|
{9, nullptr, "OpenDataFileSystemByApplicationId"},
|
|
|
|
{9, nullptr, "OpenDataFileSystemByApplicationId"},
|
|
|
|
{11, nullptr, "OpenBisFileSystem"},
|
|
|
|
{11, nullptr, "OpenBisFileSystem"},
|
|
|
|
{12, nullptr, "OpenBisStorage"},
|
|
|
|
{12, nullptr, "OpenBisStorage"},
|
|
|
|
{13, nullptr, "InvalidateBisCache"},
|
|
|
|
{13, nullptr, "InvalidateBisCache"},
|
|
|
|
{17, nullptr, "OpenHostFileSystem"},
|
|
|
|
{17, nullptr, "OpenHostFileSystem"},
|
|
|
|
{18, &FSP_SRV::OpenSdCardFileSystem, "OpenSdCardFileSystem"},
|
|
|
|
{18, D<&FSP_SRV::OpenSdCardFileSystem>, "OpenSdCardFileSystem"},
|
|
|
|
{19, nullptr, "FormatSdCardFileSystem"},
|
|
|
|
{19, nullptr, "FormatSdCardFileSystem"},
|
|
|
|
{21, nullptr, "DeleteSaveDataFileSystem"},
|
|
|
|
{21, nullptr, "DeleteSaveDataFileSystem"},
|
|
|
|
{22, &FSP_SRV::CreateSaveDataFileSystem, "CreateSaveDataFileSystem"},
|
|
|
|
{22, D<&FSP_SRV::CreateSaveDataFileSystem>, "CreateSaveDataFileSystem"},
|
|
|
|
{23, &FSP_SRV::CreateSaveDataFileSystemBySystemSaveDataId, "CreateSaveDataFileSystemBySystemSaveDataId"},
|
|
|
|
{23, D<&FSP_SRV::CreateSaveDataFileSystemBySystemSaveDataId>, "CreateSaveDataFileSystemBySystemSaveDataId"},
|
|
|
|
{24, nullptr, "RegisterSaveDataFileSystemAtomicDeletion"},
|
|
|
|
{24, nullptr, "RegisterSaveDataFileSystemAtomicDeletion"},
|
|
|
|
{25, nullptr, "DeleteSaveDataFileSystemBySaveDataSpaceId"},
|
|
|
|
{25, nullptr, "DeleteSaveDataFileSystemBySaveDataSpaceId"},
|
|
|
|
{26, nullptr, "FormatSdCardDryRun"},
|
|
|
|
{26, nullptr, "FormatSdCardDryRun"},
|
|
|
@ -245,26 +72,26 @@ FSP_SRV::FSP_SRV(Core::System& system_)
|
|
|
|
{31, nullptr, "OpenGameCardFileSystem"},
|
|
|
|
{31, nullptr, "OpenGameCardFileSystem"},
|
|
|
|
{32, nullptr, "ExtendSaveDataFileSystem"},
|
|
|
|
{32, nullptr, "ExtendSaveDataFileSystem"},
|
|
|
|
{33, nullptr, "DeleteCacheStorage"},
|
|
|
|
{33, nullptr, "DeleteCacheStorage"},
|
|
|
|
{34, &FSP_SRV::GetCacheStorageSize, "GetCacheStorageSize"},
|
|
|
|
{34, D<&FSP_SRV::GetCacheStorageSize>, "GetCacheStorageSize"},
|
|
|
|
{35, nullptr, "CreateSaveDataFileSystemByHashSalt"},
|
|
|
|
{35, nullptr, "CreateSaveDataFileSystemByHashSalt"},
|
|
|
|
{36, nullptr, "OpenHostFileSystemWithOption"},
|
|
|
|
{36, nullptr, "OpenHostFileSystemWithOption"},
|
|
|
|
{51, &FSP_SRV::OpenSaveDataFileSystem, "OpenSaveDataFileSystem"},
|
|
|
|
{51, D<&FSP_SRV::OpenSaveDataFileSystem>, "OpenSaveDataFileSystem"},
|
|
|
|
{52, &FSP_SRV::OpenSaveDataFileSystemBySystemSaveDataId, "OpenSaveDataFileSystemBySystemSaveDataId"},
|
|
|
|
{52, D<&FSP_SRV::OpenSaveDataFileSystemBySystemSaveDataId>, "OpenSaveDataFileSystemBySystemSaveDataId"},
|
|
|
|
{53, &FSP_SRV::OpenReadOnlySaveDataFileSystem, "OpenReadOnlySaveDataFileSystem"},
|
|
|
|
{53, D<&FSP_SRV::OpenReadOnlySaveDataFileSystem>, "OpenReadOnlySaveDataFileSystem"},
|
|
|
|
{57, nullptr, "ReadSaveDataFileSystemExtraDataBySaveDataSpaceId"},
|
|
|
|
{57, nullptr, "ReadSaveDataFileSystemExtraDataBySaveDataSpaceId"},
|
|
|
|
{58, nullptr, "ReadSaveDataFileSystemExtraData"},
|
|
|
|
{58, nullptr, "ReadSaveDataFileSystemExtraData"},
|
|
|
|
{59, nullptr, "WriteSaveDataFileSystemExtraData"},
|
|
|
|
{59, nullptr, "WriteSaveDataFileSystemExtraData"},
|
|
|
|
{60, nullptr, "OpenSaveDataInfoReader"},
|
|
|
|
{60, nullptr, "OpenSaveDataInfoReader"},
|
|
|
|
{61, &FSP_SRV::OpenSaveDataInfoReaderBySaveDataSpaceId, "OpenSaveDataInfoReaderBySaveDataSpaceId"},
|
|
|
|
{61, D<&FSP_SRV::OpenSaveDataInfoReaderBySaveDataSpaceId>, "OpenSaveDataInfoReaderBySaveDataSpaceId"},
|
|
|
|
{62, &FSP_SRV::OpenSaveDataInfoReaderOnlyCacheStorage, "OpenSaveDataInfoReaderOnlyCacheStorage"},
|
|
|
|
{62, D<&FSP_SRV::OpenSaveDataInfoReaderOnlyCacheStorage>, "OpenSaveDataInfoReaderOnlyCacheStorage"},
|
|
|
|
{64, nullptr, "OpenSaveDataInternalStorageFileSystem"},
|
|
|
|
{64, nullptr, "OpenSaveDataInternalStorageFileSystem"},
|
|
|
|
{65, nullptr, "UpdateSaveDataMacForDebug"},
|
|
|
|
{65, nullptr, "UpdateSaveDataMacForDebug"},
|
|
|
|
{66, nullptr, "WriteSaveDataFileSystemExtraData2"},
|
|
|
|
{66, nullptr, "WriteSaveDataFileSystemExtraData2"},
|
|
|
|
{67, nullptr, "FindSaveDataWithFilter"},
|
|
|
|
{67, nullptr, "FindSaveDataWithFilter"},
|
|
|
|
{68, nullptr, "OpenSaveDataInfoReaderBySaveDataFilter"},
|
|
|
|
{68, nullptr, "OpenSaveDataInfoReaderBySaveDataFilter"},
|
|
|
|
{69, nullptr, "ReadSaveDataFileSystemExtraDataBySaveDataAttribute"},
|
|
|
|
{69, nullptr, "ReadSaveDataFileSystemExtraDataBySaveDataAttribute"},
|
|
|
|
{70, &FSP_SRV::WriteSaveDataFileSystemExtraDataBySaveDataAttribute, "WriteSaveDataFileSystemExtraDataBySaveDataAttribute"},
|
|
|
|
{70, D<&FSP_SRV::WriteSaveDataFileSystemExtraDataBySaveDataAttribute>, "WriteSaveDataFileSystemExtraDataBySaveDataAttribute"},
|
|
|
|
{71, &FSP_SRV::ReadSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute, "ReadSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute"},
|
|
|
|
{71, D<&FSP_SRV::ReadSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute>, "ReadSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute"},
|
|
|
|
{80, nullptr, "OpenSaveDataMetaFile"},
|
|
|
|
{80, nullptr, "OpenSaveDataMetaFile"},
|
|
|
|
{81, nullptr, "OpenSaveDataTransferManager"},
|
|
|
|
{81, nullptr, "OpenSaveDataTransferManager"},
|
|
|
|
{82, nullptr, "OpenSaveDataTransferManagerVersion2"},
|
|
|
|
{82, nullptr, "OpenSaveDataTransferManagerVersion2"},
|
|
|
@ -279,12 +106,12 @@ FSP_SRV::FSP_SRV(Core::System& system_)
|
|
|
|
{110, nullptr, "OpenContentStorageFileSystem"},
|
|
|
|
{110, nullptr, "OpenContentStorageFileSystem"},
|
|
|
|
{120, nullptr, "OpenCloudBackupWorkStorageFileSystem"},
|
|
|
|
{120, nullptr, "OpenCloudBackupWorkStorageFileSystem"},
|
|
|
|
{130, nullptr, "OpenCustomStorageFileSystem"},
|
|
|
|
{130, nullptr, "OpenCustomStorageFileSystem"},
|
|
|
|
{200, &FSP_SRV::OpenDataStorageByCurrentProcess, "OpenDataStorageByCurrentProcess"},
|
|
|
|
{200, D<&FSP_SRV::OpenDataStorageByCurrentProcess>, "OpenDataStorageByCurrentProcess"},
|
|
|
|
{201, nullptr, "OpenDataStorageByProgramId"},
|
|
|
|
{201, nullptr, "OpenDataStorageByProgramId"},
|
|
|
|
{202, &FSP_SRV::OpenDataStorageByDataId, "OpenDataStorageByDataId"},
|
|
|
|
{202, D<&FSP_SRV::OpenDataStorageByDataId>, "OpenDataStorageByDataId"},
|
|
|
|
{203, &FSP_SRV::OpenPatchDataStorageByCurrentProcess, "OpenPatchDataStorageByCurrentProcess"},
|
|
|
|
{203, D<&FSP_SRV::OpenPatchDataStorageByCurrentProcess>, "OpenPatchDataStorageByCurrentProcess"},
|
|
|
|
{204, nullptr, "OpenDataFileSystemByProgramIndex"},
|
|
|
|
{204, nullptr, "OpenDataFileSystemByProgramIndex"},
|
|
|
|
{205, &FSP_SRV::OpenDataStorageWithProgramIndex, "OpenDataStorageWithProgramIndex"},
|
|
|
|
{205, D<&FSP_SRV::OpenDataStorageWithProgramIndex>, "OpenDataStorageWithProgramIndex"},
|
|
|
|
{206, nullptr, "OpenDataStorageByPath"},
|
|
|
|
{206, nullptr, "OpenDataStorageByPath"},
|
|
|
|
{400, nullptr, "OpenDeviceOperator"},
|
|
|
|
{400, nullptr, "OpenDeviceOperator"},
|
|
|
|
{500, nullptr, "OpenSdCardDetectionEventNotifier"},
|
|
|
|
{500, nullptr, "OpenSdCardDetectionEventNotifier"},
|
|
|
@ -324,25 +151,25 @@ FSP_SRV::FSP_SRV(Core::System& system_)
|
|
|
|
{1000, nullptr, "SetBisRootForHost"},
|
|
|
|
{1000, nullptr, "SetBisRootForHost"},
|
|
|
|
{1001, nullptr, "SetSaveDataSize"},
|
|
|
|
{1001, nullptr, "SetSaveDataSize"},
|
|
|
|
{1002, nullptr, "SetSaveDataRootPath"},
|
|
|
|
{1002, nullptr, "SetSaveDataRootPath"},
|
|
|
|
{1003, &FSP_SRV::DisableAutoSaveDataCreation, "DisableAutoSaveDataCreation"},
|
|
|
|
{1003, D<&FSP_SRV::DisableAutoSaveDataCreation>, "DisableAutoSaveDataCreation"},
|
|
|
|
{1004, &FSP_SRV::SetGlobalAccessLogMode, "SetGlobalAccessLogMode"},
|
|
|
|
{1004, D<&FSP_SRV::SetGlobalAccessLogMode>, "SetGlobalAccessLogMode"},
|
|
|
|
{1005, &FSP_SRV::GetGlobalAccessLogMode, "GetGlobalAccessLogMode"},
|
|
|
|
{1005, D<&FSP_SRV::GetGlobalAccessLogMode>, "GetGlobalAccessLogMode"},
|
|
|
|
{1006, &FSP_SRV::OutputAccessLogToSdCard, "OutputAccessLogToSdCard"},
|
|
|
|
{1006, D<&FSP_SRV::OutputAccessLogToSdCard>, "OutputAccessLogToSdCard"},
|
|
|
|
{1007, nullptr, "RegisterUpdatePartition"},
|
|
|
|
{1007, nullptr, "RegisterUpdatePartition"},
|
|
|
|
{1008, nullptr, "OpenRegisteredUpdatePartition"},
|
|
|
|
{1008, nullptr, "OpenRegisteredUpdatePartition"},
|
|
|
|
{1009, nullptr, "GetAndClearMemoryReportInfo"},
|
|
|
|
{1009, nullptr, "GetAndClearMemoryReportInfo"},
|
|
|
|
{1010, nullptr, "SetDataStorageRedirectTarget"},
|
|
|
|
{1010, nullptr, "SetDataStorageRedirectTarget"},
|
|
|
|
{1011, &FSP_SRV::GetProgramIndexForAccessLog, "GetProgramIndexForAccessLog"},
|
|
|
|
{1011, D<&FSP_SRV::GetProgramIndexForAccessLog>, "GetProgramIndexForAccessLog"},
|
|
|
|
{1012, nullptr, "GetFsStackUsage"},
|
|
|
|
{1012, nullptr, "GetFsStackUsage"},
|
|
|
|
{1013, nullptr, "UnsetSaveDataRootPath"},
|
|
|
|
{1013, nullptr, "UnsetSaveDataRootPath"},
|
|
|
|
{1014, nullptr, "OutputMultiProgramTagAccessLog"},
|
|
|
|
{1014, nullptr, "OutputMultiProgramTagAccessLog"},
|
|
|
|
{1016, &FSP_SRV::FlushAccessLogOnSdCard, "FlushAccessLogOnSdCard"},
|
|
|
|
{1016, D<&FSP_SRV::FlushAccessLogOnSdCard>, "FlushAccessLogOnSdCard"},
|
|
|
|
{1017, nullptr, "OutputApplicationInfoAccessLog"},
|
|
|
|
{1017, nullptr, "OutputApplicationInfoAccessLog"},
|
|
|
|
{1018, nullptr, "SetDebugOption"},
|
|
|
|
{1018, nullptr, "SetDebugOption"},
|
|
|
|
{1019, nullptr, "UnsetDebugOption"},
|
|
|
|
{1019, nullptr, "UnsetDebugOption"},
|
|
|
|
{1100, nullptr, "OverrideSaveDataTransferTokenSignVerificationKey"},
|
|
|
|
{1100, nullptr, "OverrideSaveDataTransferTokenSignVerificationKey"},
|
|
|
|
{1110, nullptr, "CorruptSaveDataFileSystemBySaveDataSpaceId2"},
|
|
|
|
{1110, nullptr, "CorruptSaveDataFileSystemBySaveDataSpaceId2"},
|
|
|
|
{1200, &FSP_SRV::OpenMultiCommitManager, "OpenMultiCommitManager"},
|
|
|
|
{1200, D<&FSP_SRV::OpenMultiCommitManager>, "OpenMultiCommitManager"},
|
|
|
|
{1300, nullptr, "OpenBisWiper"},
|
|
|
|
{1300, nullptr, "OpenBisWiper"},
|
|
|
|
};
|
|
|
|
};
|
|
|
|
// clang-format on
|
|
|
|
// clang-format on
|
|
|
@ -355,234 +182,177 @@ FSP_SRV::FSP_SRV(Core::System& system_)
|
|
|
|
|
|
|
|
|
|
|
|
FSP_SRV::~FSP_SRV() = default;
|
|
|
|
FSP_SRV::~FSP_SRV() = default;
|
|
|
|
|
|
|
|
|
|
|
|
void FSP_SRV::SetCurrentProcess(HLERequestContext& ctx) {
|
|
|
|
Result FSP_SRV::SetCurrentProcess(ClientProcessId pid) {
|
|
|
|
current_process_id = ctx.GetPID();
|
|
|
|
current_process_id = *pid;
|
|
|
|
|
|
|
|
|
|
|
|
LOG_DEBUG(Service_FS, "called. current_process_id=0x{:016X}", current_process_id);
|
|
|
|
LOG_DEBUG(Service_FS, "called. current_process_id=0x{:016X}", current_process_id);
|
|
|
|
|
|
|
|
|
|
|
|
const auto res =
|
|
|
|
R_RETURN(
|
|
|
|
fsc.OpenProcess(&program_id, &save_data_controller, &romfs_controller, current_process_id);
|
|
|
|
fsc.OpenProcess(&program_id, &save_data_controller, &romfs_controller, current_process_id));
|
|
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
|
|
|
|
rb.Push(res);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void FSP_SRV::OpenFileSystemWithPatch(HLERequestContext& ctx) {
|
|
|
|
Result FSP_SRV::OpenFileSystemWithPatch(OutInterface<IFileSystem> out_interface,
|
|
|
|
IPC::RequestParser rp{ctx};
|
|
|
|
FileSystemProxyType type, u64 open_program_id) {
|
|
|
|
|
|
|
|
LOG_ERROR(Service_FS, "(STUBBED) called with type={}, program_id={:016X}", type,
|
|
|
|
struct InputParameters {
|
|
|
|
open_program_id);
|
|
|
|
FileSystemProxyType type;
|
|
|
|
|
|
|
|
u64 program_id;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
static_assert(sizeof(InputParameters) == 0x10, "InputParameters has wrong size");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const auto params = rp.PopRaw<InputParameters>();
|
|
|
|
|
|
|
|
LOG_ERROR(Service_FS, "(STUBBED) called with type={}, program_id={:016X}", params.type,
|
|
|
|
|
|
|
|
params.program_id);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// FIXME: many issues with this
|
|
|
|
// FIXME: many issues with this
|
|
|
|
ASSERT(params.type == FileSystemProxyType::Manual);
|
|
|
|
ASSERT(type == FileSystemProxyType::Manual);
|
|
|
|
const auto manual_romfs = romfs_controller->OpenPatchedRomFS(
|
|
|
|
const auto manual_romfs = romfs_controller->OpenPatchedRomFS(
|
|
|
|
params.program_id, FileSys::ContentRecordType::HtmlDocument);
|
|
|
|
open_program_id, FileSys::ContentRecordType::HtmlDocument);
|
|
|
|
|
|
|
|
|
|
|
|
ASSERT(manual_romfs != nullptr);
|
|
|
|
ASSERT(manual_romfs != nullptr);
|
|
|
|
|
|
|
|
|
|
|
|
const auto extracted_romfs = FileSys::ExtractRomFS(manual_romfs);
|
|
|
|
const auto extracted_romfs = FileSys::ExtractRomFS(manual_romfs);
|
|
|
|
ASSERT(extracted_romfs != nullptr);
|
|
|
|
ASSERT(extracted_romfs != nullptr);
|
|
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
|
|
|
*out_interface = std::make_shared<IFileSystem>(
|
|
|
|
rb.Push(ResultSuccess);
|
|
|
|
system, extracted_romfs, SizeGetter::FromStorageId(fsc, FileSys::StorageId::NandUser));
|
|
|
|
rb.PushIpcInterface<IFileSystem>(system, extracted_romfs,
|
|
|
|
|
|
|
|
SizeGetter::FromStorageId(fsc, FileSys::StorageId::NandUser));
|
|
|
|
R_SUCCEED();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void FSP_SRV::OpenSdCardFileSystem(HLERequestContext& ctx) {
|
|
|
|
Result FSP_SRV::OpenSdCardFileSystem(OutInterface<IFileSystem> out_interface) {
|
|
|
|
LOG_DEBUG(Service_FS, "called");
|
|
|
|
LOG_DEBUG(Service_FS, "called");
|
|
|
|
|
|
|
|
|
|
|
|
FileSys::VirtualDir sdmc_dir{};
|
|
|
|
FileSys::VirtualDir sdmc_dir{};
|
|
|
|
fsc.OpenSDMC(&sdmc_dir);
|
|
|
|
fsc.OpenSDMC(&sdmc_dir);
|
|
|
|
|
|
|
|
|
|
|
|
auto filesystem = std::make_shared<IFileSystem>(
|
|
|
|
*out_interface = std::make_shared<IFileSystem>(
|
|
|
|
system, sdmc_dir, SizeGetter::FromStorageId(fsc, FileSys::StorageId::SdCard));
|
|
|
|
system, sdmc_dir, SizeGetter::FromStorageId(fsc, FileSys::StorageId::SdCard));
|
|
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
|
|
|
R_SUCCEED();
|
|
|
|
rb.Push(ResultSuccess);
|
|
|
|
|
|
|
|
rb.PushIpcInterface<IFileSystem>(std::move(filesystem));
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void FSP_SRV::CreateSaveDataFileSystem(HLERequestContext& ctx) {
|
|
|
|
Result FSP_SRV::CreateSaveDataFileSystem(FileSys::SaveDataCreationInfo save_create_struct,
|
|
|
|
IPC::RequestParser rp{ctx};
|
|
|
|
FileSys::SaveDataAttribute save_struct, u128 uid) {
|
|
|
|
|
|
|
|
|
|
|
|
auto save_struct = rp.PopRaw<FileSys::SaveDataAttribute>();
|
|
|
|
|
|
|
|
[[maybe_unused]] auto save_create_struct = rp.PopRaw<std::array<u8, 0x40>>();
|
|
|
|
|
|
|
|
u128 uid = rp.PopRaw<u128>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LOG_DEBUG(Service_FS, "called save_struct = {}, uid = {:016X}{:016X}", save_struct.DebugInfo(),
|
|
|
|
LOG_DEBUG(Service_FS, "called save_struct = {}, uid = {:016X}{:016X}", save_struct.DebugInfo(),
|
|
|
|
uid[1], uid[0]);
|
|
|
|
uid[1], uid[0]);
|
|
|
|
|
|
|
|
|
|
|
|
FileSys::VirtualDir save_data_dir{};
|
|
|
|
FileSys::VirtualDir save_data_dir{};
|
|
|
|
save_data_controller->CreateSaveData(&save_data_dir, FileSys::SaveDataSpaceId::NandUser,
|
|
|
|
R_RETURN(save_data_controller->CreateSaveData(&save_data_dir, FileSys::SaveDataSpaceId::User,
|
|
|
|
save_struct);
|
|
|
|
save_struct));
|
|
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
|
|
|
|
rb.Push(ResultSuccess);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void FSP_SRV::CreateSaveDataFileSystemBySystemSaveDataId(HLERequestContext& ctx) {
|
|
|
|
Result FSP_SRV::CreateSaveDataFileSystemBySystemSaveDataId(
|
|
|
|
IPC::RequestParser rp{ctx};
|
|
|
|
FileSys::SaveDataCreationInfo save_create_struct, FileSys::SaveDataAttribute save_struct) {
|
|
|
|
|
|
|
|
|
|
|
|
auto save_struct = rp.PopRaw<FileSys::SaveDataAttribute>();
|
|
|
|
|
|
|
|
[[maybe_unused]] auto save_create_struct = rp.PopRaw<std::array<u8, 0x40>>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LOG_DEBUG(Service_FS, "called save_struct = {}", save_struct.DebugInfo());
|
|
|
|
LOG_DEBUG(Service_FS, "called save_struct = {}", save_struct.DebugInfo());
|
|
|
|
|
|
|
|
|
|
|
|
FileSys::VirtualDir save_data_dir{};
|
|
|
|
FileSys::VirtualDir save_data_dir{};
|
|
|
|
save_data_controller->CreateSaveData(&save_data_dir, FileSys::SaveDataSpaceId::NandSystem,
|
|
|
|
R_RETURN(save_data_controller->CreateSaveData(&save_data_dir, FileSys::SaveDataSpaceId::System,
|
|
|
|
save_struct);
|
|
|
|
save_struct));
|
|
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
|
|
|
|
rb.Push(ResultSuccess);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void FSP_SRV::OpenSaveDataFileSystem(HLERequestContext& ctx) {
|
|
|
|
Result FSP_SRV::OpenSaveDataFileSystem(OutInterface<IFileSystem> out_interface,
|
|
|
|
IPC::RequestParser rp{ctx};
|
|
|
|
FileSys::SaveDataSpaceId space_id,
|
|
|
|
|
|
|
|
FileSys::SaveDataAttribute attribute) {
|
|
|
|
struct Parameters {
|
|
|
|
|
|
|
|
FileSys::SaveDataSpaceId space_id;
|
|
|
|
|
|
|
|
FileSys::SaveDataAttribute attribute;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const auto parameters = rp.PopRaw<Parameters>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LOG_INFO(Service_FS, "called.");
|
|
|
|
LOG_INFO(Service_FS, "called.");
|
|
|
|
|
|
|
|
|
|
|
|
FileSys::VirtualDir dir{};
|
|
|
|
FileSys::VirtualDir dir{};
|
|
|
|
auto result =
|
|
|
|
R_TRY(save_data_controller->OpenSaveData(&dir, space_id, attribute));
|
|
|
|
save_data_controller->OpenSaveData(&dir, parameters.space_id, parameters.attribute);
|
|
|
|
|
|
|
|
if (result != ResultSuccess) {
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2, 0, 0};
|
|
|
|
|
|
|
|
rb.Push(FileSys::ResultTargetNotFound);
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FileSys::StorageId id{};
|
|
|
|
FileSys::StorageId id{};
|
|
|
|
switch (parameters.space_id) {
|
|
|
|
switch (space_id) {
|
|
|
|
case FileSys::SaveDataSpaceId::NandUser:
|
|
|
|
case FileSys::SaveDataSpaceId::User:
|
|
|
|
id = FileSys::StorageId::NandUser;
|
|
|
|
id = FileSys::StorageId::NandUser;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case FileSys::SaveDataSpaceId::SdCardSystem:
|
|
|
|
case FileSys::SaveDataSpaceId::SdSystem:
|
|
|
|
case FileSys::SaveDataSpaceId::SdCardUser:
|
|
|
|
case FileSys::SaveDataSpaceId::SdUser:
|
|
|
|
id = FileSys::StorageId::SdCard;
|
|
|
|
id = FileSys::StorageId::SdCard;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case FileSys::SaveDataSpaceId::NandSystem:
|
|
|
|
case FileSys::SaveDataSpaceId::System:
|
|
|
|
id = FileSys::StorageId::NandSystem;
|
|
|
|
id = FileSys::StorageId::NandSystem;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case FileSys::SaveDataSpaceId::TemporaryStorage:
|
|
|
|
case FileSys::SaveDataSpaceId::Temporary:
|
|
|
|
case FileSys::SaveDataSpaceId::ProperSystem:
|
|
|
|
case FileSys::SaveDataSpaceId::ProperSystem:
|
|
|
|
case FileSys::SaveDataSpaceId::SafeMode:
|
|
|
|
case FileSys::SaveDataSpaceId::SafeMode:
|
|
|
|
ASSERT(false);
|
|
|
|
ASSERT(false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
auto filesystem =
|
|
|
|
*out_interface =
|
|
|
|
std::make_shared<IFileSystem>(system, std::move(dir), SizeGetter::FromStorageId(fsc, id));
|
|
|
|
std::make_shared<IFileSystem>(system, std::move(dir), SizeGetter::FromStorageId(fsc, id));
|
|
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
|
|
|
R_SUCCEED();
|
|
|
|
rb.Push(ResultSuccess);
|
|
|
|
|
|
|
|
rb.PushIpcInterface<IFileSystem>(std::move(filesystem));
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void FSP_SRV::OpenSaveDataFileSystemBySystemSaveDataId(HLERequestContext& ctx) {
|
|
|
|
Result FSP_SRV::OpenSaveDataFileSystemBySystemSaveDataId(OutInterface<IFileSystem> out_interface,
|
|
|
|
|
|
|
|
FileSys::SaveDataSpaceId space_id,
|
|
|
|
|
|
|
|
FileSys::SaveDataAttribute attribute) {
|
|
|
|
LOG_WARNING(Service_FS, "(STUBBED) called, delegating to 51 OpenSaveDataFilesystem");
|
|
|
|
LOG_WARNING(Service_FS, "(STUBBED) called, delegating to 51 OpenSaveDataFilesystem");
|
|
|
|
OpenSaveDataFileSystem(ctx);
|
|
|
|
R_RETURN(OpenSaveDataFileSystem(out_interface, space_id, attribute));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void FSP_SRV::OpenReadOnlySaveDataFileSystem(HLERequestContext& ctx) {
|
|
|
|
Result FSP_SRV::OpenReadOnlySaveDataFileSystem(OutInterface<IFileSystem> out_interface,
|
|
|
|
|
|
|
|
FileSys::SaveDataSpaceId space_id,
|
|
|
|
|
|
|
|
FileSys::SaveDataAttribute attribute) {
|
|
|
|
LOG_WARNING(Service_FS, "(STUBBED) called, delegating to 51 OpenSaveDataFilesystem");
|
|
|
|
LOG_WARNING(Service_FS, "(STUBBED) called, delegating to 51 OpenSaveDataFilesystem");
|
|
|
|
OpenSaveDataFileSystem(ctx);
|
|
|
|
R_RETURN(OpenSaveDataFileSystem(out_interface, space_id, attribute));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void FSP_SRV::OpenSaveDataInfoReaderBySaveDataSpaceId(HLERequestContext& ctx) {
|
|
|
|
Result FSP_SRV::OpenSaveDataInfoReaderBySaveDataSpaceId(
|
|
|
|
IPC::RequestParser rp{ctx};
|
|
|
|
OutInterface<ISaveDataInfoReader> out_interface, FileSys::SaveDataSpaceId space) {
|
|
|
|
const auto space = rp.PopRaw<FileSys::SaveDataSpaceId>();
|
|
|
|
|
|
|
|
LOG_INFO(Service_FS, "called, space={}", space);
|
|
|
|
LOG_INFO(Service_FS, "called, space={}", space);
|
|
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
|
|
|
*out_interface = std::make_shared<ISaveDataInfoReader>(system, save_data_controller, space);
|
|
|
|
rb.Push(ResultSuccess);
|
|
|
|
|
|
|
|
rb.PushIpcInterface<ISaveDataInfoReader>(
|
|
|
|
R_SUCCEED();
|
|
|
|
std::make_shared<ISaveDataInfoReader>(system, save_data_controller, space));
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void FSP_SRV::OpenSaveDataInfoReaderOnlyCacheStorage(HLERequestContext& ctx) {
|
|
|
|
Result FSP_SRV::OpenSaveDataInfoReaderOnlyCacheStorage(
|
|
|
|
|
|
|
|
OutInterface<ISaveDataInfoReader> out_interface) {
|
|
|
|
LOG_WARNING(Service_FS, "(STUBBED) called");
|
|
|
|
LOG_WARNING(Service_FS, "(STUBBED) called");
|
|
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
|
|
|
*out_interface = std::make_shared<ISaveDataInfoReader>(system, save_data_controller,
|
|
|
|
rb.Push(ResultSuccess);
|
|
|
|
FileSys::SaveDataSpaceId::Temporary);
|
|
|
|
rb.PushIpcInterface<ISaveDataInfoReader>(system, save_data_controller,
|
|
|
|
|
|
|
|
FileSys::SaveDataSpaceId::TemporaryStorage);
|
|
|
|
R_SUCCEED();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void FSP_SRV::WriteSaveDataFileSystemExtraDataBySaveDataAttribute(HLERequestContext& ctx) {
|
|
|
|
Result FSP_SRV::WriteSaveDataFileSystemExtraDataBySaveDataAttribute() {
|
|
|
|
LOG_WARNING(Service_FS, "(STUBBED) called.");
|
|
|
|
LOG_WARNING(Service_FS, "(STUBBED) called.");
|
|
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
R_SUCCEED();
|
|
|
|
rb.Push(ResultSuccess);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void FSP_SRV::ReadSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute(HLERequestContext& ctx) {
|
|
|
|
Result FSP_SRV::ReadSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute(
|
|
|
|
IPC::RequestParser rp{ctx};
|
|
|
|
FileSys::SaveDataSpaceId space_id, FileSys::SaveDataAttribute attribute,
|
|
|
|
|
|
|
|
InBuffer<BufferAttr_HipcMapAlias> mask_buffer, OutBuffer<BufferAttr_HipcMapAlias> out_buffer) {
|
|
|
|
struct Parameters {
|
|
|
|
|
|
|
|
FileSys::SaveDataSpaceId space_id;
|
|
|
|
|
|
|
|
FileSys::SaveDataAttribute attribute;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const auto parameters = rp.PopRaw<Parameters>();
|
|
|
|
|
|
|
|
// Stub this to None for now, backend needs an impl to read/write the SaveDataExtraData
|
|
|
|
// Stub this to None for now, backend needs an impl to read/write the SaveDataExtraData
|
|
|
|
constexpr auto flags = static_cast<u32>(FileSys::SaveDataFlags::None);
|
|
|
|
// In an earlier version of the code, this was returned as an out argument, but this is not
|
|
|
|
|
|
|
|
// correct
|
|
|
|
|
|
|
|
[[maybe_unused]] constexpr auto flags = static_cast<u32>(FileSys::SaveDataFlags::None);
|
|
|
|
|
|
|
|
|
|
|
|
LOG_WARNING(Service_FS,
|
|
|
|
LOG_WARNING(Service_FS,
|
|
|
|
"(STUBBED) called, flags={}, space_id={}, attribute.title_id={:016X}\n"
|
|
|
|
"(STUBBED) called, flags={}, space_id={}, attribute.program_id={:016X}\n"
|
|
|
|
"attribute.user_id={:016X}{:016X}, attribute.save_id={:016X}\n"
|
|
|
|
"attribute.user_id={:016X}{:016X}, attribute.save_id={:016X}\n"
|
|
|
|
"attribute.type={}, attribute.rank={}, attribute.index={}",
|
|
|
|
"attribute.type={}, attribute.rank={}, attribute.index={}",
|
|
|
|
flags, parameters.space_id, parameters.attribute.title_id,
|
|
|
|
flags, space_id, attribute.program_id, attribute.user_id[1], attribute.user_id[0],
|
|
|
|
parameters.attribute.user_id[1], parameters.attribute.user_id[0],
|
|
|
|
attribute.system_save_data_id, attribute.type, attribute.rank, attribute.index);
|
|
|
|
parameters.attribute.save_id, parameters.attribute.type, parameters.attribute.rank,
|
|
|
|
|
|
|
|
parameters.attribute.index);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 3};
|
|
|
|
R_SUCCEED();
|
|
|
|
rb.Push(ResultSuccess);
|
|
|
|
|
|
|
|
rb.Push(flags);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void FSP_SRV::OpenDataStorageByCurrentProcess(HLERequestContext& ctx) {
|
|
|
|
Result FSP_SRV::OpenDataStorageByCurrentProcess(OutInterface<IStorage> out_interface) {
|
|
|
|
LOG_DEBUG(Service_FS, "called");
|
|
|
|
LOG_DEBUG(Service_FS, "called");
|
|
|
|
|
|
|
|
|
|
|
|
if (!romfs) {
|
|
|
|
if (!romfs) {
|
|
|
|
auto current_romfs = romfs_controller->OpenRomFSCurrentProcess();
|
|
|
|
auto current_romfs = romfs_controller->OpenRomFSCurrentProcess();
|
|
|
|
if (!current_romfs) {
|
|
|
|
if (!current_romfs) {
|
|
|
|
// TODO (bunnei): Find the right error code to use here
|
|
|
|
// TODO (bunnei): Find the right error code to use here
|
|
|
|
LOG_CRITICAL(Service_FS, "no file system interface available!");
|
|
|
|
LOG_CRITICAL(Service_FS, "No file system interface available!");
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
R_RETURN(ResultUnknown);
|
|
|
|
rb.Push(ResultUnknown);
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
romfs = current_romfs;
|
|
|
|
romfs = current_romfs;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
auto storage = std::make_shared<IStorage>(system, romfs);
|
|
|
|
*out_interface = std::make_shared<IStorage>(system, romfs);
|
|
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
|
|
|
R_SUCCEED();
|
|
|
|
rb.Push(ResultSuccess);
|
|
|
|
|
|
|
|
rb.PushIpcInterface<IStorage>(std::move(storage));
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void FSP_SRV::OpenDataStorageByDataId(HLERequestContext& ctx) {
|
|
|
|
Result FSP_SRV::OpenDataStorageByDataId(OutInterface<IStorage> out_interface,
|
|
|
|
IPC::RequestParser rp{ctx};
|
|
|
|
FileSys::StorageId storage_id, u32 unknown, u64 title_id) {
|
|
|
|
const auto storage_id = rp.PopRaw<FileSys::StorageId>();
|
|
|
|
|
|
|
|
const auto unknown = rp.PopRaw<u32>();
|
|
|
|
|
|
|
|
const auto title_id = rp.PopRaw<u64>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LOG_DEBUG(Service_FS, "called with storage_id={:02X}, unknown={:08X}, title_id={:016X}",
|
|
|
|
LOG_DEBUG(Service_FS, "called with storage_id={:02X}, unknown={:08X}, title_id={:016X}",
|
|
|
|
storage_id, unknown, title_id);
|
|
|
|
storage_id, unknown, title_id);
|
|
|
|
|
|
|
|
|
|
|
@ -592,19 +362,15 @@ void FSP_SRV::OpenDataStorageByDataId(HLERequestContext& ctx) {
|
|
|
|
const auto archive = FileSys::SystemArchive::SynthesizeSystemArchive(title_id);
|
|
|
|
const auto archive = FileSys::SystemArchive::SynthesizeSystemArchive(title_id);
|
|
|
|
|
|
|
|
|
|
|
|
if (archive != nullptr) {
|
|
|
|
if (archive != nullptr) {
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
|
|
|
*out_interface = std::make_shared<IStorage>(system, archive);
|
|
|
|
rb.Push(ResultSuccess);
|
|
|
|
R_SUCCEED();
|
|
|
|
rb.PushIpcInterface(std::make_shared<IStorage>(system, archive));
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// TODO(DarkLordZach): Find the right error code to use here
|
|
|
|
// TODO(DarkLordZach): Find the right error code to use here
|
|
|
|
LOG_ERROR(Service_FS,
|
|
|
|
LOG_ERROR(Service_FS,
|
|
|
|
"could not open data storage with title_id={:016X}, storage_id={:02X}", title_id,
|
|
|
|
"Could not open data storage with title_id={:016X}, storage_id={:02X}", title_id,
|
|
|
|
storage_id);
|
|
|
|
storage_id);
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
R_RETURN(ResultUnknown);
|
|
|
|
rb.Push(ResultUnknown);
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const FileSys::PatchManager pm{title_id, fsc, content_provider};
|
|
|
|
const FileSys::PatchManager pm{title_id, fsc, content_provider};
|
|
|
@ -614,28 +380,20 @@ void FSP_SRV::OpenDataStorageByDataId(HLERequestContext& ctx) {
|
|
|
|
auto storage = std::make_shared<IStorage>(
|
|
|
|
auto storage = std::make_shared<IStorage>(
|
|
|
|
system, pm.PatchRomFS(base.get(), std::move(data), FileSys::ContentRecordType::Data));
|
|
|
|
system, pm.PatchRomFS(base.get(), std::move(data), FileSys::ContentRecordType::Data));
|
|
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
|
|
|
*out_interface = std::move(storage);
|
|
|
|
rb.Push(ResultSuccess);
|
|
|
|
R_SUCCEED();
|
|
|
|
rb.PushIpcInterface<IStorage>(std::move(storage));
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void FSP_SRV::OpenPatchDataStorageByCurrentProcess(HLERequestContext& ctx) {
|
|
|
|
Result FSP_SRV::OpenPatchDataStorageByCurrentProcess(OutInterface<IStorage> out_interface,
|
|
|
|
IPC::RequestParser rp{ctx};
|
|
|
|
FileSys::StorageId storage_id, u64 title_id) {
|
|
|
|
|
|
|
|
LOG_WARNING(Service_FS, "(STUBBED) called with storage_id={:02X}, title_id={:016X}", storage_id,
|
|
|
|
|
|
|
|
title_id);
|
|
|
|
|
|
|
|
|
|
|
|
const auto storage_id = rp.PopRaw<FileSys::StorageId>();
|
|
|
|
R_RETURN(FileSys::ResultTargetNotFound);
|
|
|
|
const auto title_id = rp.PopRaw<u64>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LOG_DEBUG(Service_FS, "called with storage_id={:02X}, title_id={:016X}", storage_id, title_id);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
|
|
|
|
rb.Push(FileSys::ResultTargetNotFound);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void FSP_SRV::OpenDataStorageWithProgramIndex(HLERequestContext& ctx) {
|
|
|
|
Result FSP_SRV::OpenDataStorageWithProgramIndex(OutInterface<IStorage> out_interface,
|
|
|
|
IPC::RequestParser rp{ctx};
|
|
|
|
u8 program_index) {
|
|
|
|
|
|
|
|
|
|
|
|
const auto program_index = rp.PopRaw<u8>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LOG_DEBUG(Service_FS, "called, program_index={}", program_index);
|
|
|
|
LOG_DEBUG(Service_FS, "called, program_index={}", program_index);
|
|
|
|
|
|
|
|
|
|
|
|
auto patched_romfs = romfs_controller->OpenPatchedRomFSWithProgramIndex(
|
|
|
|
auto patched_romfs = romfs_controller->OpenPatchedRomFSWithProgramIndex(
|
|
|
@ -643,123 +401,80 @@ void FSP_SRV::OpenDataStorageWithProgramIndex(HLERequestContext& ctx) {
|
|
|
|
|
|
|
|
|
|
|
|
if (!patched_romfs) {
|
|
|
|
if (!patched_romfs) {
|
|
|
|
// TODO: Find the right error code to use here
|
|
|
|
// TODO: Find the right error code to use here
|
|
|
|
LOG_ERROR(Service_FS, "could not open storage with program_index={}", program_index);
|
|
|
|
LOG_ERROR(Service_FS, "Could not open storage with program_index={}", program_index);
|
|
|
|
|
|
|
|
R_RETURN(ResultUnknown);
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
|
|
|
|
rb.Push(ResultUnknown);
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
auto storage = std::make_shared<IStorage>(system, std::move(patched_romfs));
|
|
|
|
*out_interface = std::make_shared<IStorage>(system, std::move(patched_romfs));
|
|
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
|
|
|
R_SUCCEED();
|
|
|
|
rb.Push(ResultSuccess);
|
|
|
|
|
|
|
|
rb.PushIpcInterface<IStorage>(std::move(storage));
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void FSP_SRV::DisableAutoSaveDataCreation(HLERequestContext& ctx) {
|
|
|
|
Result FSP_SRV::DisableAutoSaveDataCreation() {
|
|
|
|
LOG_DEBUG(Service_FS, "called");
|
|
|
|
LOG_DEBUG(Service_FS, "called");
|
|
|
|
|
|
|
|
|
|
|
|
save_data_controller->SetAutoCreate(false);
|
|
|
|
save_data_controller->SetAutoCreate(false);
|
|
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
R_SUCCEED();
|
|
|
|
rb.Push(ResultSuccess);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void FSP_SRV::SetGlobalAccessLogMode(HLERequestContext& ctx) {
|
|
|
|
Result FSP_SRV::SetGlobalAccessLogMode(AccessLogMode access_log_mode_) {
|
|
|
|
IPC::RequestParser rp{ctx};
|
|
|
|
LOG_DEBUG(Service_FS, "called, access_log_mode={}", access_log_mode_);
|
|
|
|
access_log_mode = rp.PopEnum<AccessLogMode>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LOG_DEBUG(Service_FS, "called, access_log_mode={}", access_log_mode);
|
|
|
|
access_log_mode = access_log_mode_;
|
|
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
R_SUCCEED();
|
|
|
|
rb.Push(ResultSuccess);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void FSP_SRV::GetGlobalAccessLogMode(HLERequestContext& ctx) {
|
|
|
|
Result FSP_SRV::GetGlobalAccessLogMode(Out<AccessLogMode> out_access_log_mode) {
|
|
|
|
LOG_DEBUG(Service_FS, "called");
|
|
|
|
LOG_DEBUG(Service_FS, "called");
|
|
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 3};
|
|
|
|
*out_access_log_mode = access_log_mode;
|
|
|
|
rb.Push(ResultSuccess);
|
|
|
|
|
|
|
|
rb.PushEnum(access_log_mode);
|
|
|
|
R_SUCCEED();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void FSP_SRV::OutputAccessLogToSdCard(HLERequestContext& ctx) {
|
|
|
|
Result FSP_SRV::OutputAccessLogToSdCard(InBuffer<BufferAttr_HipcMapAlias> log_message_buffer) {
|
|
|
|
const auto raw = ctx.ReadBufferCopy();
|
|
|
|
LOG_DEBUG(Service_FS, "called");
|
|
|
|
|
|
|
|
|
|
|
|
auto log = Common::StringFromFixedZeroTerminatedBuffer(
|
|
|
|
auto log = Common::StringFromFixedZeroTerminatedBuffer(
|
|
|
|
reinterpret_cast<const char*>(raw.data()), raw.size());
|
|
|
|
reinterpret_cast<const char*>(log_message_buffer.data()), log_message_buffer.size());
|
|
|
|
|
|
|
|
|
|
|
|
LOG_DEBUG(Service_FS, "called");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
reporter.SaveFSAccessLog(log);
|
|
|
|
reporter.SaveFSAccessLog(log);
|
|
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
R_SUCCEED();
|
|
|
|
rb.Push(ResultSuccess);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void FSP_SRV::GetProgramIndexForAccessLog(HLERequestContext& ctx) {
|
|
|
|
Result FSP_SRV::GetProgramIndexForAccessLog(Out<AccessLogVersion> out_access_log_version,
|
|
|
|
LOG_DEBUG(Service_FS, "called");
|
|
|
|
Out<u32> out_access_log_program_index) {
|
|
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 4};
|
|
|
|
|
|
|
|
rb.Push(ResultSuccess);
|
|
|
|
|
|
|
|
rb.PushEnum(AccessLogVersion::Latest);
|
|
|
|
|
|
|
|
rb.Push(access_log_program_index);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void FSP_SRV::FlushAccessLogOnSdCard(HLERequestContext& ctx) {
|
|
|
|
|
|
|
|
LOG_DEBUG(Service_FS, "(STUBBED) called");
|
|
|
|
LOG_DEBUG(Service_FS, "(STUBBED) called");
|
|
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
*out_access_log_version = AccessLogVersion::Latest;
|
|
|
|
rb.Push(ResultSuccess);
|
|
|
|
*out_access_log_program_index = access_log_program_index;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
R_SUCCEED();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void FSP_SRV::GetCacheStorageSize(HLERequestContext& ctx) {
|
|
|
|
Result FSP_SRV::FlushAccessLogOnSdCard() {
|
|
|
|
IPC::RequestParser rp{ctx};
|
|
|
|
LOG_DEBUG(Service_FS, "(STUBBED) called");
|
|
|
|
const auto index{rp.Pop<s32>()};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
R_SUCCEED();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Result FSP_SRV::GetCacheStorageSize(s32 index, Out<s64> out_data_size, Out<s64> out_journal_size) {
|
|
|
|
LOG_WARNING(Service_FS, "(STUBBED) called with index={}", index);
|
|
|
|
LOG_WARNING(Service_FS, "(STUBBED) called with index={}", index);
|
|
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 6};
|
|
|
|
*out_data_size = 0;
|
|
|
|
rb.Push(ResultSuccess);
|
|
|
|
*out_journal_size = 0;
|
|
|
|
rb.Push(s64{0});
|
|
|
|
|
|
|
|
rb.Push(s64{0});
|
|
|
|
R_SUCCEED();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
class IMultiCommitManager final : public ServiceFramework<IMultiCommitManager> {
|
|
|
|
Result FSP_SRV::OpenMultiCommitManager(OutInterface<IMultiCommitManager> out_interface) {
|
|
|
|
public:
|
|
|
|
|
|
|
|
explicit IMultiCommitManager(Core::System& system_)
|
|
|
|
|
|
|
|
: ServiceFramework{system_, "IMultiCommitManager"} {
|
|
|
|
|
|
|
|
static const FunctionInfo functions[] = {
|
|
|
|
|
|
|
|
{1, &IMultiCommitManager::Add, "Add"},
|
|
|
|
|
|
|
|
{2, &IMultiCommitManager::Commit, "Commit"},
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
RegisterHandlers(functions);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
FileSys::VirtualFile backend;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void Add(HLERequestContext& ctx) {
|
|
|
|
|
|
|
|
LOG_WARNING(Service_FS, "(STUBBED) called");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
|
|
|
|
rb.Push(ResultSuccess);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void Commit(HLERequestContext& ctx) {
|
|
|
|
|
|
|
|
LOG_WARNING(Service_FS, "(STUBBED) called");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2};
|
|
|
|
|
|
|
|
rb.Push(ResultSuccess);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void FSP_SRV::OpenMultiCommitManager(HLERequestContext& ctx) {
|
|
|
|
|
|
|
|
LOG_DEBUG(Service_FS, "called");
|
|
|
|
LOG_DEBUG(Service_FS, "called");
|
|
|
|
|
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
|
|
|
*out_interface = std::make_shared<IMultiCommitManager>(system);
|
|
|
|
rb.Push(ResultSuccess);
|
|
|
|
|
|
|
|
rb.PushIpcInterface<IMultiCommitManager>(std::make_shared<IMultiCommitManager>(system));
|
|
|
|
R_SUCCEED();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace Service::FileSystem
|
|
|
|
} // namespace Service::FileSystem
|
|
|
|