diff options
author | bunnei <bunneidev@gmail.com> | 2021-06-03 00:29:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-03 00:29:09 +0200 |
commit | 4ea171fa5e50723d50b57b26aaaca2fac30eea57 (patch) | |
tree | ef2f0869252f59b0b8aeb62a48e2a233c0f94664 /src/core/hle/service/filesystem/fsp_srv.cpp | |
parent | Merge pull request #6403 from Kewlan/game-list-for-loop-optimization (diff) | |
parent | general: Replace RESULT_UNKNOWN with ResultUnknown (diff) | |
download | yuzu-4ea171fa5e50723d50b57b26aaaca2fac30eea57.tar yuzu-4ea171fa5e50723d50b57b26aaaca2fac30eea57.tar.gz yuzu-4ea171fa5e50723d50b57b26aaaca2fac30eea57.tar.bz2 yuzu-4ea171fa5e50723d50b57b26aaaca2fac30eea57.tar.lz yuzu-4ea171fa5e50723d50b57b26aaaca2fac30eea57.tar.xz yuzu-4ea171fa5e50723d50b57b26aaaca2fac30eea57.tar.zst yuzu-4ea171fa5e50723d50b57b26aaaca2fac30eea57.zip |
Diffstat (limited to 'src/core/hle/service/filesystem/fsp_srv.cpp')
-rw-r--r-- | src/core/hle/service/filesystem/fsp_srv.cpp | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/src/core/hle/service/filesystem/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp_srv.cpp index 92ea27074..d9e8020b4 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)); } @@ -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,14 +1019,14 @@ 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)); } @@ -1037,14 +1037,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 +1058,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 +1088,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 +1103,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)); } |