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

@@ -23,7 +23,7 @@ namespace ams::fssrv::fscreator {
/* Allocate a local filesystem. */
auto local_fs = fs::AllocateShared<fssystem::LocalFileSystem>();
R_UNLESS(local_fs != nullptr, fs::ResultAllocationFailureInLocalFileSystemCreatorA());
R_UNLESS(local_fs != nullptr, fs::ResultAllocationMemoryFailedInLocalFileSystemCreatorA());
/* If we're supposed to make sure the root path exists, do so. */
if (ensure_root) {

View File

@@ -20,7 +20,7 @@ namespace ams::fssrv::fscreator {
Result PartitionFileSystemCreator::Create(std::shared_ptr<fs::fsa::IFileSystem> *out, std::shared_ptr<fs::IStorage> storage) {
/* Allocate a filesystem. */
std::shared_ptr fs = fssystem::AllocateShared<fssystem::PartitionFileSystem>();
R_UNLESS(fs != nullptr, fs::ResultAllocationFailureInPartitionFileSystemCreatorA());
R_UNLESS(fs != nullptr, fs::ResultAllocationMemoryFailedInPartitionFileSystemCreatorA());
/* Initialize the filesystem. */
R_TRY(fs->Initialize(std::move(storage)));

View File

@@ -57,7 +57,7 @@ namespace ams::fssrv::fscreator {
Result RomFileSystemCreator::Create(std::shared_ptr<fs::fsa::IFileSystem> *out, std::shared_ptr<fs::IStorage> storage) {
/* Allocate a filesystem. */
std::shared_ptr fs = fssystem::AllocateShared<RomFileSystemWithBuffer>(m_allocator);
R_UNLESS(fs != nullptr, fs::ResultAllocationFailureInRomFileSystemCreatorA());
R_UNLESS(fs != nullptr, fs::ResultAllocationMemoryFailedInRomFileSystemCreatorA());
/* Initialize the filesystem. */
R_TRY(fs->Initialize(std::move(storage)));

View File

@@ -50,7 +50,7 @@ namespace ams::fssrv::fscreator {
Result StorageOnNcaCreator::CreateNcaReader(std::shared_ptr<fssystem::NcaReader> *out, std::shared_ptr<fs::IStorage> storage) {
/* Create a reader. */
std::shared_ptr reader = fssystem::AllocateShared<fssystem::NcaReader>();
R_UNLESS(reader != nullptr, fs::ResultAllocationFailureInStorageOnNcaCreatorB());
R_UNLESS(reader != nullptr, fs::ResultAllocationMemoryFailedInStorageOnNcaCreatorB());
/* Initialize the reader. */
R_TRY(reader->Initialize(std::move(storage), m_nca_crypto_cfg, m_nca_compression_cfg, m_hash_generator_factory_selector));

View File

@@ -26,7 +26,7 @@ namespace ams::fssrv::fscreator {
/* Allocate a SubDirectoryFileSystem. */
auto sub_dir_fs = fs::AllocateShared<fssystem::SubDirectoryFileSystem>(std::move(base_fs));
R_UNLESS(sub_dir_fs != nullptr, fs::ResultAllocationFailureInSubDirectoryFileSystemCreatorA());
R_UNLESS(sub_dir_fs != nullptr, fs::ResultAllocationMemoryFailedInSubDirectoryFileSystemCreatorA());
/* Initialize the new filesystem. */
R_TRY(sub_dir_fs->Initialize(path));