summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/filesystem
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/core/hle/service/filesystem/filesystem.cpp66
-rw-r--r--src/core/hle/service/filesystem/filesystem.h2
-rw-r--r--src/core/hle/service/filesystem/fsp_srv.cpp87
-rw-r--r--src/core/hle/service/filesystem/fsp_srv.h1
4 files changed, 86 insertions, 70 deletions
diff --git a/src/core/hle/service/filesystem/filesystem.cpp b/src/core/hle/service/filesystem/filesystem.cpp
index 78664439d..3c16fe6c7 100644
--- a/src/core/hle/service/filesystem/filesystem.cpp
+++ b/src/core/hle/service/filesystem/filesystem.cpp
@@ -60,27 +60,27 @@ ResultCode VfsDirectoryServiceWrapper::CreateFile(const std::string& path_, u64
}
const auto entry_type = GetEntryType(path);
- if (entry_type.Code() == RESULT_SUCCESS) {
+ if (entry_type.Code() == ResultSuccess) {
return FileSys::ERROR_PATH_ALREADY_EXISTS;
}
auto file = dir->CreateFile(Common::FS::GetFilename(path));
if (file == nullptr) {
// TODO(DarkLordZach): Find a better error code for this
- return RESULT_UNKNOWN;
+ return ResultUnknown;
}
if (!file->Resize(size)) {
// TODO(DarkLordZach): Find a better error code for this
- return RESULT_UNKNOWN;
+ return ResultUnknown;
}
- return RESULT_SUCCESS;
+ return ResultSuccess;
}
ResultCode VfsDirectoryServiceWrapper::DeleteFile(const std::string& path_) const {
std::string path(Common::FS::SanitizePath(path_));
if (path.empty()) {
// TODO(DarkLordZach): Why do games call this and what should it do? Works as is but...
- return RESULT_SUCCESS;
+ return ResultSuccess;
}
auto dir = GetDirectoryRelativeWrapped(backing, Common::FS::GetParentPath(path));
@@ -89,10 +89,10 @@ ResultCode VfsDirectoryServiceWrapper::DeleteFile(const std::string& path_) cons
}
if (!dir->DeleteFile(Common::FS::GetFilename(path))) {
// TODO(DarkLordZach): Find a better error code for this
- return RESULT_UNKNOWN;
+ return ResultUnknown;
}
- return RESULT_SUCCESS;
+ return ResultSuccess;
}
ResultCode VfsDirectoryServiceWrapper::CreateDirectory(const std::string& path_) const {
@@ -104,9 +104,9 @@ ResultCode VfsDirectoryServiceWrapper::CreateDirectory(const std::string& path_)
auto new_dir = dir->CreateSubdirectory(Common::FS::GetFilename(path));
if (new_dir == nullptr) {
// TODO(DarkLordZach): Find a better error code for this
- return RESULT_UNKNOWN;
+ return ResultUnknown;
}
- return RESULT_SUCCESS;
+ return ResultSuccess;
}
ResultCode VfsDirectoryServiceWrapper::DeleteDirectory(const std::string& path_) const {
@@ -114,9 +114,9 @@ ResultCode VfsDirectoryServiceWrapper::DeleteDirectory(const std::string& path_)
auto dir = GetDirectoryRelativeWrapped(backing, Common::FS::GetParentPath(path));
if (!dir->DeleteSubdirectory(Common::FS::GetFilename(path))) {
// TODO(DarkLordZach): Find a better error code for this
- return RESULT_UNKNOWN;
+ return ResultUnknown;
}
- return RESULT_SUCCESS;
+ return ResultSuccess;
}
ResultCode VfsDirectoryServiceWrapper::DeleteDirectoryRecursively(const std::string& path_) const {
@@ -124,9 +124,9 @@ ResultCode VfsDirectoryServiceWrapper::DeleteDirectoryRecursively(const std::str
auto dir = GetDirectoryRelativeWrapped(backing, Common::FS::GetParentPath(path));
if (!dir->DeleteSubdirectoryRecursive(Common::FS::GetFilename(path))) {
// TODO(DarkLordZach): Find a better error code for this
- return RESULT_UNKNOWN;
+ return ResultUnknown;
}
- return RESULT_SUCCESS;
+ return ResultSuccess;
}
ResultCode VfsDirectoryServiceWrapper::CleanDirectoryRecursively(const std::string& path) const {
@@ -135,10 +135,10 @@ ResultCode VfsDirectoryServiceWrapper::CleanDirectoryRecursively(const std::stri
if (!dir->CleanSubdirectoryRecursive(Common::FS::GetFilename(sanitized_path))) {
// TODO(DarkLordZach): Find a better error code for this
- return RESULT_UNKNOWN;
+ return ResultUnknown;
}
- return RESULT_SUCCESS;
+ return ResultSuccess;
}
ResultCode VfsDirectoryServiceWrapper::RenameFile(const std::string& src_path_,
@@ -152,14 +152,14 @@ ResultCode VfsDirectoryServiceWrapper::RenameFile(const std::string& src_path_,
return FileSys::ERROR_PATH_NOT_FOUND;
if (!src->Rename(Common::FS::GetFilename(dest_path))) {
// TODO(DarkLordZach): Find a better error code for this
- return RESULT_UNKNOWN;
+ return ResultUnknown;
}
- return RESULT_SUCCESS;
+ return ResultSuccess;
}
// Move by hand -- TODO(DarkLordZach): Optimize
auto c_res = CreateFile(dest_path, src->GetSize());
- if (c_res != RESULT_SUCCESS)
+ if (c_res != ResultSuccess)
return c_res;
auto dest = backing->GetFileRelative(dest_path);
@@ -170,10 +170,10 @@ ResultCode VfsDirectoryServiceWrapper::RenameFile(const std::string& src_path_,
if (!src->GetContainingDirectory()->DeleteFile(Common::FS::GetFilename(src_path))) {
// TODO(DarkLordZach): Find a better error code for this
- return RESULT_UNKNOWN;
+ return ResultUnknown;
}
- return RESULT_SUCCESS;
+ return ResultSuccess;
}
ResultCode VfsDirectoryServiceWrapper::RenameDirectory(const std::string& src_path_,
@@ -187,9 +187,9 @@ ResultCode VfsDirectoryServiceWrapper::RenameDirectory(const std::string& src_pa
return FileSys::ERROR_PATH_NOT_FOUND;
if (!src->Rename(Common::FS::GetFilename(dest_path))) {
// TODO(DarkLordZach): Find a better error code for this
- return RESULT_UNKNOWN;
+ return ResultUnknown;
}
- return RESULT_SUCCESS;
+ return ResultSuccess;
}
// TODO(DarkLordZach): Implement renaming across the tree (move).
@@ -199,7 +199,7 @@ ResultCode VfsDirectoryServiceWrapper::RenameDirectory(const std::string& src_pa
src_path, dest_path);
// TODO(DarkLordZach): Find a better error code for this
- return RESULT_UNKNOWN;
+ return ResultUnknown;
}
ResultVal<FileSys::VirtualFile> VfsDirectoryServiceWrapper::OpenFile(const std::string& path_,
@@ -258,7 +258,7 @@ FileSystemController::~FileSystemController() = default;
ResultCode FileSystemController::RegisterRomFS(std::unique_ptr<FileSys::RomFSFactory>&& factory) {
romfs_factory = std::move(factory);
LOG_DEBUG(Service_FS, "Registered RomFS");
- return RESULT_SUCCESS;
+ return ResultSuccess;
}
ResultCode FileSystemController::RegisterSaveData(
@@ -266,21 +266,21 @@ ResultCode FileSystemController::RegisterSaveData(
ASSERT_MSG(save_data_factory == nullptr, "Tried to register a second save data");
save_data_factory = std::move(factory);
LOG_DEBUG(Service_FS, "Registered save data");
- return RESULT_SUCCESS;
+ return ResultSuccess;
}
ResultCode FileSystemController::RegisterSDMC(std::unique_ptr<FileSys::SDMCFactory>&& factory) {
ASSERT_MSG(sdmc_factory == nullptr, "Tried to register a second SDMC");
sdmc_factory = std::move(factory);
LOG_DEBUG(Service_FS, "Registered SDMC");
- return RESULT_SUCCESS;
+ return ResultSuccess;
}
ResultCode FileSystemController::RegisterBIS(std::unique_ptr<FileSys::BISFactory>&& factory) {
ASSERT_MSG(bis_factory == nullptr, "Tried to register a second BIS");
bis_factory = std::move(factory);
LOG_DEBUG(Service_FS, "Registered BIS");
- return RESULT_SUCCESS;
+ return ResultSuccess;
}
void FileSystemController::SetPackedUpdate(FileSys::VirtualFile update_raw) {
@@ -297,7 +297,7 @@ ResultVal<FileSys::VirtualFile> FileSystemController::OpenRomFSCurrentProcess()
if (romfs_factory == nullptr) {
// TODO(bunnei): Find a better error code for this
- return RESULT_UNKNOWN;
+ return ResultUnknown;
}
return romfs_factory->OpenCurrentProcess(system.CurrentProcess()->GetTitleID());
@@ -309,7 +309,7 @@ ResultVal<FileSys::VirtualFile> FileSystemController::OpenPatchedRomFS(
if (romfs_factory == nullptr) {
// TODO: Find a better error code for this
- return RESULT_UNKNOWN;
+ return ResultUnknown;
}
return romfs_factory->OpenPatchedRomFS(title_id, type);
@@ -322,7 +322,7 @@ ResultVal<FileSys::VirtualFile> FileSystemController::OpenPatchedRomFSWithProgra
if (romfs_factory == nullptr) {
// TODO: Find a better error code for this
- return RESULT_UNKNOWN;
+ return ResultUnknown;
}
return romfs_factory->OpenPatchedRomFSWithProgramIndex(title_id, program_index, type);
@@ -335,7 +335,7 @@ ResultVal<FileSys::VirtualFile> FileSystemController::OpenRomFS(
if (romfs_factory == nullptr) {
// TODO(bunnei): Find a better error code for this
- return RESULT_UNKNOWN;
+ return ResultUnknown;
}
return romfs_factory->Open(title_id, storage_id, type);
@@ -721,6 +721,10 @@ FileSys::VirtualDir FileSystemController::GetBCATDirectory(u64 title_id) const {
return bis_factory->GetBCATDirectory(title_id);
}
+void FileSystemController::SetAutoSaveDataCreation(bool enable) {
+ save_data_factory->SetAutoCreate(enable);
+}
+
void FileSystemController::CreateFactories(FileSys::VfsFilesystem& vfs, bool overwrite) {
if (overwrite) {
bis_factory = nullptr;
diff --git a/src/core/hle/service/filesystem/filesystem.h b/src/core/hle/service/filesystem/filesystem.h
index 7102d3f9a..b6b1b9220 100644
--- a/src/core/hle/service/filesystem/filesystem.h
+++ b/src/core/hle/service/filesystem/filesystem.h
@@ -120,6 +120,8 @@ public:
FileSys::VirtualDir GetBCATDirectory(u64 title_id) const;
+ void SetAutoSaveDataCreation(bool enable);
+
// Creates the SaveData, SDMC, and BIS Factories. Should be called once and before any function
// above is called.
void CreateFactories(FileSys::VfsFilesystem& vfs, bool overwrite = true);
diff --git a/src/core/hle/service/filesystem/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp_srv.cpp
index 92ea27074..3af9881c2 100644
--- a/src/core/hle/service/filesystem/fsp_srv.cpp
+++ b/src/core/hle/service/filesystem/fsp_srv.cpp
@@ -100,7 +100,7 @@ private:
ctx.WriteBuffer(output);
IPC::ResponseBuilder rb{ctx, 2};
- rb.Push(RESULT_SUCCESS);
+ rb.Push(ResultSuccess);
}
void GetSize(Kernel::HLERequestContext& ctx) {
@@ -108,7 +108,7 @@ private:
LOG_DEBUG(Service_FS, "called, size={}", size);
IPC::ResponseBuilder rb{ctx, 4};
- rb.Push(RESULT_SUCCESS);
+ rb.Push(ResultSuccess);
rb.Push<u64>(size);
}
};
@@ -162,7 +162,7 @@ private:
ctx.WriteBuffer(output);
IPC::ResponseBuilder rb{ctx, 4};
- rb.Push(RESULT_SUCCESS);
+ rb.Push(ResultSuccess);
rb.Push(static_cast<u64>(output.size()));
}
@@ -206,7 +206,7 @@ private:
written);
IPC::ResponseBuilder rb{ctx, 2};
- rb.Push(RESULT_SUCCESS);
+ rb.Push(ResultSuccess);
}
void Flush(Kernel::HLERequestContext& ctx) {
@@ -215,7 +215,7 @@ private:
// Exists for SDK compatibiltity -- No need to flush file.
IPC::ResponseBuilder rb{ctx, 2};
- rb.Push(RESULT_SUCCESS);
+ rb.Push(ResultSuccess);
}
void SetSize(Kernel::HLERequestContext& ctx) {
@@ -226,7 +226,7 @@ private:
backend->Resize(size);
IPC::ResponseBuilder rb{ctx, 2};
- rb.Push(RESULT_SUCCESS);
+ rb.Push(ResultSuccess);
}
void GetSize(Kernel::HLERequestContext& ctx) {
@@ -234,7 +234,7 @@ private:
LOG_DEBUG(Service_FS, "called, size={}", size);
IPC::ResponseBuilder rb{ctx, 4};
- rb.Push(RESULT_SUCCESS);
+ rb.Push(ResultSuccess);
rb.Push<u64>(size);
}
};
@@ -290,7 +290,7 @@ private:
ctx.WriteBuffer(begin, range_size);
IPC::ResponseBuilder rb{ctx, 4};
- rb.Push(RESULT_SUCCESS);
+ rb.Push(ResultSuccess);
rb.Push(actual_entries);
}
@@ -300,7 +300,7 @@ private:
u64 count = entries.size() - next_entry_index;
IPC::ResponseBuilder rb{ctx, 4};
- rb.Push(RESULT_SUCCESS);
+ rb.Push(ResultSuccess);
rb.Push(count);
}
};
@@ -430,7 +430,7 @@ public:
auto file = std::make_shared<IFile>(system, result.Unwrap());
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
- rb.Push(RESULT_SUCCESS);
+ rb.Push(ResultSuccess);
rb.PushIpcInterface<IFile>(std::move(file));
}
@@ -455,7 +455,7 @@ public:
auto directory = std::make_shared<IDirectory>(system, result.Unwrap());
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
- rb.Push(RESULT_SUCCESS);
+ rb.Push(ResultSuccess);
rb.PushIpcInterface<IDirectory>(std::move(directory));
}
@@ -473,7 +473,7 @@ public:
}
IPC::ResponseBuilder rb{ctx, 3};
- rb.Push(RESULT_SUCCESS);
+ rb.Push(ResultSuccess);
rb.Push<u32>(static_cast<u32>(*result));
}
@@ -481,14 +481,14 @@ public:
LOG_WARNING(Service_FS, "(STUBBED) called");
IPC::ResponseBuilder rb{ctx, 2};
- rb.Push(RESULT_SUCCESS);
+ rb.Push(ResultSuccess);
}
void GetFreeSpaceSize(Kernel::HLERequestContext& ctx) {
LOG_DEBUG(Service_FS, "called");
IPC::ResponseBuilder rb{ctx, 4};
- rb.Push(RESULT_SUCCESS);
+ rb.Push(ResultSuccess);
rb.Push(size.get_free_size());
}
@@ -496,7 +496,7 @@ public:
LOG_DEBUG(Service_FS, "called");
IPC::ResponseBuilder rb{ctx, 4};
- rb.Push(RESULT_SUCCESS);
+ rb.Push(ResultSuccess);
rb.Push(size.get_total_size());
}
@@ -538,7 +538,7 @@ public:
ctx.WriteBuffer(begin, range_size);
IPC::ResponseBuilder rb{ctx, 3};
- rb.Push(RESULT_SUCCESS);
+ rb.Push(ResultSuccess);
rb.Push<u32>(static_cast<u32>(actual_entries));
}
@@ -764,7 +764,7 @@ FSP_SRV::FSP_SRV(Core::System& system_)
{1000, nullptr, "SetBisRootForHost"},
{1001, nullptr, "SetSaveDataSize"},
{1002, nullptr, "SetSaveDataRootPath"},
- {1003, nullptr, "DisableAutoSaveDataCreation"},
+ {1003, &FSP_SRV::DisableAutoSaveDataCreation, "DisableAutoSaveDataCreation"},
{1004, &FSP_SRV::SetGlobalAccessLogMode, "SetGlobalAccessLogMode"},
{1005, &FSP_SRV::GetGlobalAccessLogMode, "GetGlobalAccessLogMode"},
{1006, &FSP_SRV::OutputAccessLogToSdCard, "OutputAccessLogToSdCard"},
@@ -796,7 +796,7 @@ void FSP_SRV::SetCurrentProcess(Kernel::HLERequestContext& ctx) {
LOG_DEBUG(Service_FS, "called. current_process_id=0x{:016X}", current_process_id);
IPC::ResponseBuilder rb{ctx, 2};
- rb.Push(RESULT_SUCCESS);
+ rb.Push(ResultSuccess);
}
void FSP_SRV::OpenFileSystemWithPatch(Kernel::HLERequestContext& ctx) {
@@ -807,7 +807,7 @@ void FSP_SRV::OpenFileSystemWithPatch(Kernel::HLERequestContext& ctx) {
LOG_WARNING(Service_FS, "(STUBBED) called with type={}, title_id={:016X}", type, title_id);
IPC::ResponseBuilder rb{ctx, 2, 0, 0};
- rb.Push(RESULT_UNKNOWN);
+ rb.Push(ResultUnknown);
}
void FSP_SRV::OpenSdCardFileSystem(Kernel::HLERequestContext& ctx) {
@@ -818,7 +818,7 @@ void FSP_SRV::OpenSdCardFileSystem(Kernel::HLERequestContext& ctx) {
SizeGetter::FromStorageId(fsc, FileSys::StorageId::SdCard));
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
- rb.Push(RESULT_SUCCESS);
+ rb.Push(ResultSuccess);
rb.PushIpcInterface<IFileSystem>(std::move(filesystem));
}
@@ -835,7 +835,7 @@ void FSP_SRV::CreateSaveDataFileSystem(Kernel::HLERequestContext& ctx) {
fsc.CreateSaveData(FileSys::SaveDataSpaceId::NandUser, save_struct);
IPC::ResponseBuilder rb{ctx, 2};
- rb.Push(RESULT_SUCCESS);
+ rb.Push(ResultSuccess);
}
void FSP_SRV::OpenSaveDataFileSystem(Kernel::HLERequestContext& ctx) {
@@ -879,7 +879,7 @@ void FSP_SRV::OpenSaveDataFileSystem(Kernel::HLERequestContext& ctx) {
SizeGetter::FromStorageId(fsc, id));
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
- rb.Push(RESULT_SUCCESS);
+ rb.Push(ResultSuccess);
rb.PushIpcInterface<IFileSystem>(std::move(filesystem));
}
@@ -894,7 +894,7 @@ void FSP_SRV::OpenSaveDataInfoReaderBySaveDataSpaceId(Kernel::HLERequestContext&
LOG_INFO(Service_FS, "called, space={}", space);
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
- rb.Push(RESULT_SUCCESS);
+ rb.Push(ResultSuccess);
rb.PushIpcInterface<ISaveDataInfoReader>(
std::make_shared<ISaveDataInfoReader>(system, space, fsc));
}
@@ -903,7 +903,7 @@ void FSP_SRV::WriteSaveDataFileSystemExtraDataBySaveDataAttribute(Kernel::HLEReq
LOG_WARNING(Service_FS, "(STUBBED) called.");
IPC::ResponseBuilder rb{ctx, 2};
- rb.Push(RESULT_SUCCESS);
+ rb.Push(ResultSuccess);
}
void FSP_SRV::ReadSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute(
@@ -929,7 +929,7 @@ void FSP_SRV::ReadSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute(
parameters.attribute.index);
IPC::ResponseBuilder rb{ctx, 3};
- rb.Push(RESULT_SUCCESS);
+ rb.Push(ResultSuccess);
rb.Push(flags);
}
@@ -941,14 +941,14 @@ void FSP_SRV::OpenDataStorageByCurrentProcess(Kernel::HLERequestContext& ctx) {
// TODO (bunnei): Find the right error code to use here
LOG_CRITICAL(Service_FS, "no file system interface available!");
IPC::ResponseBuilder rb{ctx, 2};
- rb.Push(RESULT_UNKNOWN);
+ rb.Push(ResultUnknown);
return;
}
auto storage = std::make_shared<IStorage>(system, std::move(current_romfs.Unwrap()));
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
- rb.Push(RESULT_SUCCESS);
+ rb.Push(ResultSuccess);
rb.PushIpcInterface<IStorage>(std::move(storage));
}
@@ -968,7 +968,7 @@ void FSP_SRV::OpenDataStorageByDataId(Kernel::HLERequestContext& ctx) {
if (archive != nullptr) {
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
- rb.Push(RESULT_SUCCESS);
+ rb.Push(ResultSuccess);
rb.PushIpcInterface(std::make_shared<IStorage>(system, archive));
return;
}
@@ -978,7 +978,7 @@ void FSP_SRV::OpenDataStorageByDataId(Kernel::HLERequestContext& ctx) {
"could not open data storage with title_id={:016X}, storage_id={:02X}", title_id,
storage_id);
IPC::ResponseBuilder rb{ctx, 2};
- rb.Push(RESULT_UNKNOWN);
+ rb.Push(ResultUnknown);
return;
}
@@ -988,7 +988,7 @@ void FSP_SRV::OpenDataStorageByDataId(Kernel::HLERequestContext& ctx) {
system, pm.PatchRomFS(std::move(data.Unwrap()), 0, FileSys::ContentRecordType::Data));
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
- rb.Push(RESULT_SUCCESS);
+ rb.Push(ResultSuccess);
rb.PushIpcInterface<IStorage>(std::move(storage));
}
@@ -1019,17 +1019,26 @@ void FSP_SRV::OpenDataStorageWithProgramIndex(Kernel::HLERequestContext& ctx) {
LOG_ERROR(Service_FS, "could not open storage with program_index={}", program_index);
IPC::ResponseBuilder rb{ctx, 2};
- rb.Push(RESULT_UNKNOWN);
+ rb.Push(ResultUnknown);
return;
}
auto storage = std::make_shared<IStorage>(system, std::move(patched_romfs.Unwrap()));
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
- rb.Push(RESULT_SUCCESS);
+ rb.Push(ResultSuccess);
rb.PushIpcInterface<IStorage>(std::move(storage));
}
+void FSP_SRV::DisableAutoSaveDataCreation(Kernel::HLERequestContext& ctx) {
+ LOG_DEBUG(Service_FS, "called");
+
+ fsc.SetAutoSaveDataCreation(false);
+
+ IPC::ResponseBuilder rb{ctx, 2};
+ rb.Push(ResultSuccess);
+}
+
void FSP_SRV::SetGlobalAccessLogMode(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp{ctx};
log_mode = rp.PopEnum<LogMode>();
@@ -1037,14 +1046,14 @@ void FSP_SRV::SetGlobalAccessLogMode(Kernel::HLERequestContext& ctx) {
LOG_DEBUG(Service_FS, "called, log_mode={:08X}", log_mode);
IPC::ResponseBuilder rb{ctx, 2};
- rb.Push(RESULT_SUCCESS);
+ rb.Push(ResultSuccess);
}
void FSP_SRV::GetGlobalAccessLogMode(Kernel::HLERequestContext& ctx) {
LOG_DEBUG(Service_FS, "called");
IPC::ResponseBuilder rb{ctx, 3};
- rb.Push(RESULT_SUCCESS);
+ rb.Push(ResultSuccess);
rb.PushEnum(log_mode);
}
@@ -1058,14 +1067,14 @@ void FSP_SRV::OutputAccessLogToSdCard(Kernel::HLERequestContext& ctx) {
reporter.SaveFilesystemAccessReport(log_mode, std::move(log));
IPC::ResponseBuilder rb{ctx, 2};
- rb.Push(RESULT_SUCCESS);
+ rb.Push(ResultSuccess);
}
void FSP_SRV::GetProgramIndexForAccessLog(Kernel::HLERequestContext& ctx) {
LOG_DEBUG(Service_FS, "called");
IPC::ResponseBuilder rb{ctx, 4};
- rb.Push(RESULT_SUCCESS);
+ rb.Push(ResultSuccess);
rb.PushEnum(AccessLogVersion::Latest);
rb.Push(access_log_program_index);
}
@@ -1088,14 +1097,14 @@ private:
LOG_WARNING(Service_FS, "(STUBBED) called");
IPC::ResponseBuilder rb{ctx, 2};
- rb.Push(RESULT_SUCCESS);
+ rb.Push(ResultSuccess);
}
void Commit(Kernel::HLERequestContext& ctx) {
LOG_WARNING(Service_FS, "(STUBBED) called");
IPC::ResponseBuilder rb{ctx, 2};
- rb.Push(RESULT_SUCCESS);
+ rb.Push(ResultSuccess);
}
};
@@ -1103,7 +1112,7 @@ void FSP_SRV::OpenMultiCommitManager(Kernel::HLERequestContext& ctx) {
LOG_DEBUG(Service_FS, "called");
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
- rb.Push(RESULT_SUCCESS);
+ rb.Push(ResultSuccess);
rb.PushIpcInterface<IMultiCommitManager>(std::make_shared<IMultiCommitManager>(system));
}
diff --git a/src/core/hle/service/filesystem/fsp_srv.h b/src/core/hle/service/filesystem/fsp_srv.h
index b01b924eb..ff7455a20 100644
--- a/src/core/hle/service/filesystem/fsp_srv.h
+++ b/src/core/hle/service/filesystem/fsp_srv.h
@@ -50,6 +50,7 @@ private:
void OpenDataStorageByDataId(Kernel::HLERequestContext& ctx);
void OpenPatchDataStorageByCurrentProcess(Kernel::HLERequestContext& ctx);
void OpenDataStorageWithProgramIndex(Kernel::HLERequestContext& ctx);
+ void DisableAutoSaveDataCreation(Kernel::HLERequestContext& ctx);
void SetGlobalAccessLogMode(Kernel::HLERequestContext& ctx);
void GetGlobalAccessLogMode(Kernel::HLERequestContext& ctx);
void OutputAccessLogToSdCard(Kernel::HLERequestContext& ctx);