hle: Use Switch formatted result codes.

This commit is contained in:
bunnei
2017-10-31 19:26:11 -04:00
parent 3e80202604
commit 34571f4d2e
8 changed files with 110 additions and 346 deletions

View File

@ -26,9 +26,8 @@ ResultVal<std::unique_ptr<FileBackend>> IVFCArchive::OpenFile(const Path& path,
ResultCode IVFCArchive::DeleteFile(const Path& path) const {
LOG_CRITICAL(Service_FS, "Attempted to delete a file from an IVFC archive (%s).",
GetName().c_str());
// TODO(Subv): Verify error code
return ResultCode(ErrorDescription::NoData, ErrorModule::FS, ErrorSummary::Canceled,
ErrorLevel::Status);
// TODO(bunnei): Use correct error code
return ResultCode(-1);
}
ResultCode IVFCArchive::RenameFile(const Path& src_path, const Path& dest_path) const {
@ -55,9 +54,8 @@ ResultCode IVFCArchive::DeleteDirectoryRecursively(const Path& path) const {
ResultCode IVFCArchive::CreateFile(const Path& path, u64 size) const {
LOG_CRITICAL(Service_FS, "Attempted to create a file in an IVFC archive (%s).",
GetName().c_str());
// TODO: Verify error code
return ResultCode(ErrorDescription::NotAuthorized, ErrorModule::FS, ErrorSummary::NotSupported,
ErrorLevel::Permanent);
// TODO(bunnei): Use correct error code
return ResultCode(-1);
}
ResultCode IVFCArchive::CreateDirectory(const Path& path) const {