From 92be29adba56408685e594e5e659f1dc83686cde Mon Sep 17 00:00:00 2001 From: Yuri Kunde Schlesner Date: Sat, 20 May 2017 21:41:11 -0700 Subject: FileSys: Move all result description to errors.h --- src/core/file_sys/archive_extsavedata.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src/core/file_sys/archive_extsavedata.cpp') diff --git a/src/core/file_sys/archive_extsavedata.cpp b/src/core/file_sys/archive_extsavedata.cpp index f454e7840..4867c9d17 100644 --- a/src/core/file_sys/archive_extsavedata.cpp +++ b/src/core/file_sys/archive_extsavedata.cpp @@ -38,8 +38,7 @@ public: ResultVal Write(u64 offset, size_t length, bool flush, const u8* buffer) const override { if (offset > size) { - return ResultCode(ErrorDescription::FS_WriteBeyondEnd, ErrorModule::FS, - ErrorSummary::InvalidArgument, ErrorLevel::Usage); + return ERR_WRITE_BEYOND_END; } else if (offset == size) { return MakeResult(0); } @@ -191,11 +190,9 @@ ResultVal> ArchiveFactory_ExtSaveData::Open(cons // TODO(Subv): Verify the archive behavior of SharedExtSaveData compared to ExtSaveData. // ExtSaveData seems to return FS_NotFound (120) when the archive doesn't exist. if (!shared) { - return ResultCode(ErrorDescription::FS_NotFound, ErrorModule::FS, - ErrorSummary::InvalidState, ErrorLevel::Status); + return ERR_NOT_FOUND_INVALID_STATE; } else { - return ResultCode(ErrorDescription::FS_NotFormatted, ErrorModule::FS, - ErrorSummary::InvalidState, ErrorLevel::Status); + return ERR_NOT_FORMATTED; } } auto archive = std::make_unique(fullpath); @@ -230,8 +227,7 @@ ResultVal ArchiveFactory_ExtSaveData::GetFormatInfo(const Pat if (!file.IsOpen()) { LOG_ERROR(Service_FS, "Could not open metadata information for archive"); // TODO(Subv): Verify error code - return ResultCode(ErrorDescription::FS_NotFormatted, ErrorModule::FS, - ErrorSummary::InvalidState, ErrorLevel::Status); + return ERR_NOT_FORMATTED; } ArchiveFormatInfo info = {}; -- cgit v1.2.3