fs: revise allocation-fail result names

This commit is contained in:
Michael Scire
2022-03-13 01:51:42 -08:00
committed by SciresM
parent 11e4bed199
commit e13b81aa9e
50 changed files with 304 additions and 218 deletions

View File

@@ -21,21 +21,21 @@ namespace ams::fs::fsa {
Result Register(const char *name, std::unique_ptr<IFileSystem> &&fs) {
auto accessor = std::make_unique<impl::FileSystemAccessor>(name, std::move(fs));
R_UNLESS(accessor != nullptr, fs::ResultAllocationFailureInRegisterA());
R_UNLESS(accessor != nullptr, fs::ResultAllocationMemoryFailedInRegisterA());
return impl::Register(std::move(accessor));
}
Result Register(const char *name, std::unique_ptr<IFileSystem> &&fs, std::unique_ptr<ICommonMountNameGenerator> &&generator) {
auto accessor = std::make_unique<impl::FileSystemAccessor>(name, std::move(fs), std::move(generator));
R_UNLESS(accessor != nullptr, fs::ResultAllocationFailureInRegisterB());
R_UNLESS(accessor != nullptr, fs::ResultAllocationMemoryFailedInRegisterB());
return impl::Register(std::move(accessor));
}
Result Register(const char *name, std::unique_ptr<IFileSystem> &&fs, std::unique_ptr<ICommonMountNameGenerator> &&generator, bool use_data_cache, bool use_path_cache, bool support_multi_commit) {
auto accessor = std::make_unique<impl::FileSystemAccessor>(name, std::move(fs), std::move(generator));
R_UNLESS(accessor != nullptr, fs::ResultAllocationFailureInRegisterB());
R_UNLESS(accessor != nullptr, fs::ResultAllocationMemoryFailedInRegisterB());
accessor->SetFileDataCacheAttachable(use_data_cache);
accessor->SetPathBasedFileDataCacheAttachable(use_path_cache);