kernel: Update to use atmosphere macros and correct Result (#7242)
* kernel: Switch to atmosphere style macros * code: Rename ResultCode to Result * code: Result constants are lower case * Address review comments * core: Remove CASCADE_CODE * R_TRY replaces completely * core: Run clang format
This commit is contained in:
@ -44,7 +44,7 @@ ResultVal<std::unique_ptr<FileBackend>> SDMCWriteOnlyArchive::OpenFile(const Pat
|
||||
const Mode& mode) const {
|
||||
if (mode.read_flag) {
|
||||
LOG_ERROR(Service_FS, "Read flag is not supported");
|
||||
return ERROR_INVALID_READ_FLAG;
|
||||
return ResultInvalidReadFlag;
|
||||
}
|
||||
return SDMCArchive::OpenFileBase(path, mode);
|
||||
}
|
||||
@ -52,7 +52,7 @@ ResultVal<std::unique_ptr<FileBackend>> SDMCWriteOnlyArchive::OpenFile(const Pat
|
||||
ResultVal<std::unique_ptr<DirectoryBackend>> SDMCWriteOnlyArchive::OpenDirectory(
|
||||
const Path& path) const {
|
||||
LOG_ERROR(Service_FS, "Not supported");
|
||||
return ERROR_UNSUPPORTED_OPEN_FLAGS;
|
||||
return ResultUnsupportedOpenFlags;
|
||||
}
|
||||
|
||||
ArchiveFactory_SDMCWriteOnly::ArchiveFactory_SDMCWriteOnly(const std::string& mount_point)
|
||||
@ -81,19 +81,19 @@ ResultVal<std::unique_ptr<ArchiveBackend>> ArchiveFactory_SDMCWriteOnly::Open(co
|
||||
return std::make_unique<SDMCWriteOnlyArchive>(sdmc_directory, std::move(delay_generator));
|
||||
}
|
||||
|
||||
ResultCode ArchiveFactory_SDMCWriteOnly::Format(const Path& path,
|
||||
const FileSys::ArchiveFormatInfo& format_info,
|
||||
u64 program_id) {
|
||||
Result ArchiveFactory_SDMCWriteOnly::Format(const Path& path,
|
||||
const FileSys::ArchiveFormatInfo& format_info,
|
||||
u64 program_id) {
|
||||
// TODO(wwylele): hwtest this
|
||||
LOG_ERROR(Service_FS, "Attempted to format a SDMC write-only archive.");
|
||||
return RESULT_UNKNOWN;
|
||||
return ResultUnknown;
|
||||
}
|
||||
|
||||
ResultVal<ArchiveFormatInfo> ArchiveFactory_SDMCWriteOnly::GetFormatInfo(const Path& path,
|
||||
u64 program_id) const {
|
||||
// TODO(Subv): Implement
|
||||
LOG_ERROR(Service_FS, "Unimplemented GetFormatInfo archive {}", GetName());
|
||||
return RESULT_UNKNOWN;
|
||||
return ResultUnknown;
|
||||
}
|
||||
|
||||
} // namespace FileSys
|
||||
|
Reference in New Issue
Block a user