ams: use R_SUCCEED, R_THROW globally

This commit is contained in:
Michael Scire
2022-03-26 00:14:36 -07:00
parent e5b1739f65
commit dd78ede99f
370 changed files with 2107 additions and 2107 deletions

View File

@@ -75,7 +75,7 @@ namespace ams::ncm {
R_TRY(g_content_manager->OpenContentStorage(std::addressof(content_storage), storage_id));
*out = ContentStorage(std::move(content_storage));
return ResultSuccess();
R_SUCCEED();
}
Result OpenContentMetaDatabase(ContentMetaDatabase *out, StorageId storage_id) {
@@ -83,7 +83,7 @@ namespace ams::ncm {
R_TRY(g_content_manager->OpenContentMetaDatabase(std::addressof(content_db), storage_id));
*out = ContentMetaDatabase(std::move(content_db));
return ResultSuccess();
R_SUCCEED();
}
Result CleanupContentMetaDatabase(StorageId storage_id) {

View File

@@ -62,7 +62,7 @@ namespace ams::ncm {
offset += count;
}
return ResultSuccess();
R_SUCCEED();
}
}
@@ -80,11 +80,11 @@ namespace ams::ncm {
R_TRY(ForEachContentInfo(key, db, [&size](bool *out_done, const ContentInfo &info) -> Result {
size += CalculateRequiredSize(info.GetSize(), MaxClusterSize);
*out_done = false;
return ResultSuccess();
R_SUCCEED();
}));
*out_size = size;
return ResultSuccess();
R_SUCCEED();
}
}

View File

@@ -62,7 +62,7 @@ namespace ams::ncm {
R_SUCCEED_IF(done);
}
return ResultSuccess();
R_SUCCEED();
}
}
@@ -83,7 +83,7 @@ namespace ams::ncm {
R_TRY(m_db->Set(package_meta_reader.GetKey(), meta_reader.GetData(), meta_reader.GetSize()));
/* We're done. */
return ResultSuccess();
R_SUCCEED();
}
Result ContentMetaDatabaseBuilder::BuildFromStorage(ContentStorage *storage) {
@@ -198,11 +198,11 @@ namespace ams::ncm {
out_ids[count++] = { key.id };
}
return ResultSuccess();
R_SUCCEED();
}));
*out_count = static_cast<s32>(count);
return ResultSuccess();
R_SUCCEED();
}
}

View File

@@ -89,26 +89,26 @@ namespace ams::ncm {
if (cur_flags != BuiltInSystemSaveDataFlags) {
R_TRY(fs::SetSaveDataFlags(BuiltInSystemSaveDataId, fs::SaveDataSpaceId::System, BuiltInSystemSaveDataFlags));
}
return ResultSuccess();
R_SUCCEED();
}
ALWAYS_INLINE Result GetContentStorageNotActiveResult(StorageId storage_id) {
switch (storage_id) {
case StorageId::GameCard: return ncm::ResultGameCardContentStorageNotActive();
case StorageId::BuiltInSystem: return ncm::ResultBuiltInSystemContentStorageNotActive();
case StorageId::BuiltInUser: return ncm::ResultBuiltInUserContentStorageNotActive();
case StorageId::SdCard: return ncm::ResultSdCardContentStorageNotActive();
default: return ncm::ResultUnknownContentStorageNotActive();
case StorageId::GameCard: R_THROW(ncm::ResultGameCardContentStorageNotActive());
case StorageId::BuiltInSystem: R_THROW(ncm::ResultBuiltInSystemContentStorageNotActive());
case StorageId::BuiltInUser: R_THROW(ncm::ResultBuiltInUserContentStorageNotActive());
case StorageId::SdCard: R_THROW(ncm::ResultSdCardContentStorageNotActive());
default: R_THROW(ncm::ResultUnknownContentStorageNotActive());
}
}
ALWAYS_INLINE Result GetContentMetaDatabaseNotActiveResult(StorageId storage_id) {
switch (storage_id) {
case StorageId::GameCard: return ncm::ResultGameCardContentMetaDatabaseNotActive();
case StorageId::BuiltInSystem: return ncm::ResultBuiltInSystemContentMetaDatabaseNotActive();
case StorageId::BuiltInUser: return ncm::ResultBuiltInUserContentMetaDatabaseNotActive();
case StorageId::SdCard: return ncm::ResultSdCardContentMetaDatabaseNotActive();
default: return ncm::ResultUnknownContentMetaDatabaseNotActive();
case StorageId::GameCard: R_THROW(ncm::ResultGameCardContentMetaDatabaseNotActive());
case StorageId::BuiltInSystem: R_THROW(ncm::ResultBuiltInSystemContentMetaDatabaseNotActive());
case StorageId::BuiltInUser: R_THROW(ncm::ResultBuiltInUserContentMetaDatabaseNotActive());
case StorageId::SdCard: R_THROW(ncm::ResultSdCardContentMetaDatabaseNotActive());
default: R_THROW(ncm::ResultUnknownContentMetaDatabaseNotActive());
}
}
@@ -163,7 +163,7 @@ namespace ams::ncm {
}
} R_END_TRY_CATCH;
return ResultSuccess();
R_SUCCEED();
}
Result ContentManagerImpl::GetContentStorageRoot(ContentStorageRoot **out, StorageId id) {
@@ -174,11 +174,11 @@ namespace ams::ncm {
for (auto &root : m_content_storage_roots) {
if (root.storage_id == id) {
*out = std::addressof(root);
return ResultSuccess();
R_SUCCEED();
}
}
return ncm::ResultUnknownStorage();
R_THROW(ncm::ResultUnknownStorage());
}
Result ContentManagerImpl::GetContentMetaDatabaseRoot(ContentMetaDatabaseRoot **out, StorageId id) {
@@ -189,11 +189,11 @@ namespace ams::ncm {
for (auto &root : m_content_meta_database_roots) {
if (root.storage_id == id) {
*out = std::addressof(root);
return ResultSuccess();
R_SUCCEED();
}
}
return ncm::ResultUnknownStorage();
R_THROW(ncm::ResultUnknownStorage());
}
@@ -206,7 +206,7 @@ namespace ams::ncm {
std::strcpy(out->mount_name, impl::CreateUniqueMountName().str);
util::SNPrintf(out->path, sizeof(out->path), "%s:/", out->mount_name);
return ResultSuccess();
R_SUCCEED();
}
Result ContentManagerImpl::InitializeGameCardContentStorageRoot(ContentStorageRoot *out) {
@@ -217,7 +217,7 @@ namespace ams::ncm {
std::strcpy(out->mount_name, impl::CreateUniqueMountName().str);
util::SNPrintf(out->path, sizeof(out->path), "%s:", out->mount_name);
return ResultSuccess();
R_SUCCEED();
}
Result ContentManagerImpl::InitializeContentMetaDatabaseRoot(ContentMetaDatabaseRoot *out, StorageId storage_id, const SystemSaveDataInfo &info, size_t max_content_metas, ContentMetaMemoryResource *memory_resource) {
@@ -233,7 +233,7 @@ namespace ams::ncm {
out->mount_name[0] = '#';
util::SNPrintf(out->path, sizeof(out->path), "%s:/meta", out->mount_name);
return ResultSuccess();
R_SUCCEED();
}
Result ContentManagerImpl::InitializeGameCardContentMetaDatabaseRoot(ContentMetaDatabaseRoot *out, size_t max_content_metas, ContentMetaMemoryResource *memory_resource) {
@@ -243,7 +243,7 @@ namespace ams::ncm {
out->content_meta_database = nullptr;
out->kvs = util::nullopt;
return ResultSuccess();
R_SUCCEED();
}
Result ContentManagerImpl::ImportContentMetaDatabaseImpl(StorageId storage_id, const char *import_mount_name, const char *path) {
@@ -312,7 +312,7 @@ namespace ams::ncm {
R_TRY(this->ImportContentMetaDatabaseImpl(StorageId::BuiltInSystem, bis_mount_name.str, "cnmtdb.arc"));
}
return ResultSuccess();
R_SUCCEED();
}
Result ContentManagerImpl::Initialize(const ContentManagerConfig &config) {
@@ -380,7 +380,7 @@ namespace ams::ncm {
R_TRY(this->InitializeGameCardContentMetaDatabaseRoot(std::addressof(m_content_meta_database_roots[3]), GameCardMaxContentMetaCount, std::addressof(g_gamecard_content_meta_memory_resource)));
m_initialized = true;
return ResultSuccess();
R_SUCCEED();
}
Result ContentManagerImpl::CreateContentStorage(StorageId storage_id) {
@@ -463,7 +463,7 @@ namespace ams::ncm {
R_TRY(fs::HasDirectory(std::addressof(has_dir), root->path));
R_UNLESS(has_dir, ncm::ResultInvalidContentMetaDatabase());
return ResultSuccess();
R_SUCCEED();
}
Result ContentManagerImpl::OpenContentStorage(sf::Out<sf::SharedPointer<IContentStorage>> out, StorageId storage_id) {
@@ -484,7 +484,7 @@ namespace ams::ncm {
}
*out = root->content_storage;
return ResultSuccess();
R_SUCCEED();
}
Result ContentManagerImpl::OpenContentMetaDatabase(sf::Out<sf::SharedPointer<IContentMetaDatabase>> out, StorageId storage_id) {
@@ -505,7 +505,7 @@ namespace ams::ncm {
}
*out = root->content_meta_database;
return ResultSuccess();
R_SUCCEED();
}
Result ContentManagerImpl::CloseContentStorageForcibly(StorageId storage_id) {
@@ -583,7 +583,7 @@ namespace ams::ncm {
/* Prevent unmounting. */
mount_guard.Cancel();
return ResultSuccess();
R_SUCCEED();
}
Result ContentManagerImpl::InactivateContentStorage(StorageId storage_id) {
@@ -606,7 +606,7 @@ namespace ams::ncm {
}
}
return ResultSuccess();
R_SUCCEED();
}
Result ContentManagerImpl::ActivateContentMetaDatabase(StorageId storage_id) {
@@ -644,7 +644,7 @@ namespace ams::ncm {
mount_guard.Cancel();
}
return ResultSuccess();
R_SUCCEED();
}
Result ContentManagerImpl::InactivateContentMetaDatabase(StorageId storage_id) {
@@ -667,12 +667,12 @@ namespace ams::ncm {
}
}
return ResultSuccess();
R_SUCCEED();
}
Result ContentManagerImpl::InvalidateRightsIdCache() {
m_rights_id_cache.Invalidate();
return ResultSuccess();
R_SUCCEED();
}
Result ContentManagerImpl::GetMemoryReport(sf::Out<MemoryReport> out) {
@@ -704,7 +704,7 @@ namespace ams::ncm {
/* Output the report. */
out.SetValue(report);
return ResultSuccess();
R_SUCCEED();
}
}

View File

@@ -53,12 +53,12 @@ namespace ams::ncm {
auto delta = reader.GetPatchDeltaHeader(i);
if ((src_version == 0 || delta->delta.source_version == src_version) && delta->delta.destination_version == dst_version) {
*out_index = i;
return ResultSuccess();
R_SUCCEED();
}
}
/* We didn't find the delta. */
return ncm::ResultDeltaNotFound();
R_THROW(ncm::ResultDeltaNotFound());
}
s32 CountContentExceptForMeta(const PatchMetaExtendedDataReader &reader, s32 delta_index) {
@@ -219,7 +219,7 @@ namespace ams::ncm {
/* Assert that we copied the right number of infos. */
AMS_ASSERT(count == fragment_count);
return ResultSuccess();
R_SUCCEED();
}
Result PackagedContentMetaReader::CalculateConvertFragmentOnlyInstallContentMetaSize(size_t *out_size, u32 source_version) const {
@@ -233,7 +233,7 @@ namespace ams::ncm {
/* Recalculate. */
*out_size = this->CalculateConvertFragmentOnlyInstallContentMetaSize(fragment_count);
return ResultSuccess();
R_SUCCEED();
}
void PackagedContentMetaReader::ConvertToContentMeta(void *dst, size_t size, const ContentInfo &meta) {

View File

@@ -46,7 +46,7 @@ namespace ams::ncm {
/* Save output. */
*out = content_info->content_id;
return ResultSuccess();
R_SUCCEED();
}
Result ContentMetaDatabaseImpl::Set(const ContentMetaKey &key, const sf::InBuffer &value) {
@@ -64,7 +64,7 @@ namespace ams::ncm {
} R_END_TRY_CATCH;
out_size.SetValue(size);
return ResultSuccess();
R_SUCCEED();
}
Result ContentMetaDatabaseImpl::Remove(const ContentMetaKey &key) {
@@ -74,7 +74,7 @@ namespace ams::ncm {
R_CONVERT(kvdb::ResultKeyNotFound, ncm::ResultContentMetaNotFound())
} R_END_TRY_CATCH;
return ResultSuccess();
R_SUCCEED();
}
Result ContentMetaDatabaseImpl::GetContentIdByType(sf::Out<ContentId> out_content_id, const ContentMetaKey &key, ContentType type) {
@@ -100,7 +100,7 @@ namespace ams::ncm {
}
out_count.SetValue(count);
return ResultSuccess();
R_SUCCEED();
}
Result ContentMetaDatabaseImpl::List(sf::Out<s32> out_entries_total, sf::Out<s32> out_entries_written, const sf::OutArray<ContentMetaKey> &out_info, ContentMetaType meta_type, ApplicationId application_id, u64 min, u64 max, ContentInstallType install_type) {
@@ -143,7 +143,7 @@ namespace ams::ncm {
out_entries_total.SetValue(entries_total);
out_entries_written.SetValue(entries_written);
return ResultSuccess();
R_SUCCEED();
}
Result ContentMetaDatabaseImpl::GetLatestContentMetaKey(sf::Out<ContentMetaKey> out_key, u64 id) {
@@ -168,7 +168,7 @@ namespace ams::ncm {
R_UNLESS(found_key, ncm::ResultContentMetaNotFound());
out_key.SetValue(*found_key);
return ResultSuccess();
R_SUCCEED();
}
Result ContentMetaDatabaseImpl::ListApplication(sf::Out<s32> out_entries_total, sf::Out<s32> out_entries_written, const sf::OutArray<ApplicationContentMetaKey> &out_keys, ContentMetaType type) {
@@ -200,7 +200,7 @@ namespace ams::ncm {
out_entries_total.SetValue(entries_total);
out_entries_written.SetValue(entries_written);
return ResultSuccess();
R_SUCCEED();
}
Result ContentMetaDatabaseImpl::Has(sf::Out<bool> out, const ContentMetaKey &key) {
@@ -215,7 +215,7 @@ namespace ams::ncm {
} R_END_TRY_CATCH;
*out = true;
return ResultSuccess();
R_SUCCEED();
}
Result ContentMetaDatabaseImpl::HasAll(sf::Out<bool> out, const sf::InArray<ContentMetaKey> &keys) {
@@ -233,7 +233,7 @@ namespace ams::ncm {
}
*out = true;
return ResultSuccess();
R_SUCCEED();
}
Result ContentMetaDatabaseImpl::GetSize(sf::Out<u64> out_size, const ContentMetaKey &key) {
@@ -244,7 +244,7 @@ namespace ams::ncm {
R_TRY(this->GetContentMetaSize(&size, key));
out_size.SetValue(size);
return ResultSuccess();
R_SUCCEED();
}
Result ContentMetaDatabaseImpl::GetRequiredSystemVersion(sf::Out<u32> out_version, const ContentMetaKey &key) {
@@ -272,7 +272,7 @@ namespace ams::ncm {
AMS_UNREACHABLE_DEFAULT_CASE();
}
return ResultSuccess();
R_SUCCEED();
}
Result ContentMetaDatabaseImpl::GetPatchId(sf::Out<PatchId> out_patch_id, const ContentMetaKey &key) {
@@ -291,12 +291,12 @@ namespace ams::ncm {
/* Obtain the patch id. */
out_patch_id.SetValue(reader.GetExtendedHeader<ApplicationMetaExtendedHeader>()->patch_id);
return ResultSuccess();
R_SUCCEED();
}
Result ContentMetaDatabaseImpl::DisableForcibly() {
m_disabled = true;
return ResultSuccess();
R_SUCCEED();
}
Result ContentMetaDatabaseImpl::LookupOrphanContent(const sf::OutArray<bool> &out_orphaned, const sf::InArray<ContentId> &content_ids) {
@@ -332,7 +332,7 @@ namespace ams::ncm {
}
}
return ResultSuccess();
R_SUCCEED();
}
Result ContentMetaDatabaseImpl::Commit() {
@@ -362,7 +362,7 @@ namespace ams::ncm {
/* We didn't find a content info. */
out.SetValue(false);
return ResultSuccess();
R_SUCCEED();
}
Result ContentMetaDatabaseImpl::ListContentMetaInfo(sf::Out<s32> out_entries_written, const sf::OutArray<ContentMetaInfo> &out_meta_info, const ContentMetaKey &key, s32 offset) {
@@ -385,7 +385,7 @@ namespace ams::ncm {
/* Set the ouput value. */
out_entries_written.SetValue(count);
return ResultSuccess();
R_SUCCEED();
}
Result ContentMetaDatabaseImpl::GetAttributes(sf::Out<u8> out_attributes, const ContentMetaKey &key) {
@@ -401,7 +401,7 @@ namespace ams::ncm {
/* Set the ouput value. */
out_attributes.SetValue(reader.GetHeader()->attributes);
return ResultSuccess();
R_SUCCEED();
}
Result ContentMetaDatabaseImpl::GetRequiredApplicationVersion(sf::Out<u32> out_version, const ContentMetaKey &key) {
@@ -431,7 +431,7 @@ namespace ams::ncm {
/* Set the ouput value. */
out_version.SetValue(required_version);
return ResultSuccess();
R_SUCCEED();
}
Result ContentMetaDatabaseImpl::GetContentIdByTypeAndIdOffset(sf::Out<ContentId> out_content_id, const ContentMetaKey &key, ContentType type, u8 id_offset) {
@@ -441,7 +441,7 @@ namespace ams::ncm {
Result ContentMetaDatabaseImpl::GetCount(sf::Out<u32> out_count) {
R_TRY(this->EnsureEnabled());
out_count.SetValue(m_kvs->GetCount());
return ResultSuccess();
R_SUCCEED();
}
Result ContentMetaDatabaseImpl::GetOwnerApplicationId(sf::Out<ApplicationId> out_id, const ContentMetaKey &key) {
@@ -453,7 +453,7 @@ namespace ams::ncm {
/* Applications are their own owner. */
if (key.type == ContentMetaType::Application) {
out_id.SetValue({key.id});
return ResultSuccess();
R_SUCCEED();
}
/* Obtain the content meta for the key. */
@@ -478,7 +478,7 @@ namespace ams::ncm {
/* Set the output value. */
out_id.SetValue(owner_application_id);
return ResultSuccess();
R_SUCCEED();
}
}

View File

@@ -37,7 +37,7 @@ namespace ams::ncm {
/* Helpers. */
Result EnsureEnabled() const {
R_UNLESS(!m_disabled, ncm::ResultInvalidContentMetaDatabase());
return ResultSuccess();
R_SUCCEED();
}
Result GetContentMetaSize(size_t *out, const ContentMetaKey &key) const {
@@ -45,7 +45,7 @@ namespace ams::ncm {
R_CONVERT(kvdb::ResultKeyNotFound, ncm::ResultContentMetaNotFound())
} R_END_TRY_CATCH;
return ResultSuccess();
R_SUCCEED();
}
Result GetContentMetaPointer(const void **out_value_ptr, size_t *out_size, const ContentMetaKey &key) const {

View File

@@ -185,7 +185,7 @@ namespace ams::ncm {
/* Write out the buffer we've populated. */
*out_meta_infos = std::move(buffer);
return ResultSuccess();
R_SUCCEED();
};
/* If there are no firmware variations to list, read meta infos from base. */
@@ -251,7 +251,7 @@ namespace ams::ncm {
/* Output the content meta info buffer. */
*out_meta_infos = std::move(buffer);
return ResultSuccess();
R_SUCCEED();
}
void SetMountContentMetaFunction(MountContentMetaFunction func) {

View File

@@ -49,7 +49,7 @@ namespace ams::ncm {
R_CONVERT(fs::ResultPathNotFound, ncm::ResultContentNotFound())
} R_END_TRY_CATCH;
return ResultSuccess();
R_SUCCEED();
}
template<typename F>
@@ -93,7 +93,7 @@ namespace ams::ncm {
/* If the provided function wishes to terminate immediately, we should respect it. */
if (!should_continue) {
*out_should_continue = false;
return ResultSuccess();
R_SUCCEED();
}
/* Mark for retry. */
@@ -108,13 +108,13 @@ namespace ams::ncm {
if (!should_continue) {
*out_should_continue = false;
return ResultSuccess();
R_SUCCEED();
}
}
}
}
return ResultSuccess();
R_SUCCEED();
}
@@ -161,7 +161,7 @@ namespace ams::ncm {
R_TRY(fs::DeleteDirectoryRecursively(path));
R_TRY(fs::CreateDirectory(path));
}
return ResultSuccess();
R_SUCCEED();
}
}
@@ -184,7 +184,7 @@ namespace ams::ncm {
/* Open the base directory. */
R_TRY(this->OpenCurrentDirectory());
return ResultSuccess();
R_SUCCEED();
}
Result ContentStorageImpl::ContentIterator::OpenCurrentDirectory() {
@@ -197,7 +197,7 @@ namespace ams::ncm {
/* Increase our depth. */
++m_depth;
return ResultSuccess();
R_SUCCEED();
}
Result ContentStorageImpl::ContentIterator::OpenDirectory(const char *dir) {
@@ -217,7 +217,7 @@ namespace ams::ncm {
/* If we failed to load any entries, there's nothing to get. */
if (m_entry_count <= 0) {
*out = util::nullopt;
return ResultSuccess();
R_SUCCEED();
}
/* Get the next entry. */
@@ -240,12 +240,12 @@ namespace ams::ncm {
case fs::DirectoryEntryType_File:
/* Otherwise, if the entry is a file, return it. */
*out = entry;
return ResultSuccess();
R_SUCCEED();
AMS_UNREACHABLE_DEFAULT_CASE();
}
}
return ResultSuccess();
R_SUCCEED();
}
Result ContentStorageImpl::ContentIterator::LoadEntries() {
@@ -255,7 +255,7 @@ namespace ams::ncm {
/* If we have no directories open, there's nothing for us to load. */
if (m_depth == 0) {
m_entry_count = 0;
return ResultSuccess();
R_SUCCEED();
}
/* Determine the maximum entries that we can load. */
@@ -275,7 +275,7 @@ namespace ams::ncm {
/* Set our entry count. */
m_entry_count = num_entries;
return ResultSuccess();
R_SUCCEED();
}
/* We didn't read any entries, so we need to advance to the next directory. */
@@ -345,7 +345,7 @@ namespace ams::ncm {
R_UNLESS(has_registered, ncm::ResultInvalidContentStorageBase());
R_UNLESS(has_placeholder, ncm::ResultInvalidContentStorageBase());
return ResultSuccess();
R_SUCCEED();
}
void ContentStorageImpl::InvalidateFileCache() {
@@ -373,7 +373,7 @@ namespace ams::ncm {
} R_END_TRY_CATCH;
m_cached_content_id = content_id;
return ResultSuccess();
R_SUCCEED();
}
Result ContentStorageImpl::Initialize(const char *path, MakeContentPathFunction content_path_func, MakePlaceHolderPathFunction placeholder_path_func, bool delay_flush, RightsIdCache *rights_id_cache) {
@@ -387,13 +387,13 @@ namespace ams::ncm {
m_make_content_path_func = content_path_func;
m_placeholder_accessor.Initialize(std::addressof(m_root_path), placeholder_path_func, delay_flush);
m_rights_id_cache = rights_id_cache;
return ResultSuccess();
R_SUCCEED();
}
Result ContentStorageImpl::GeneratePlaceHolderId(sf::Out<PlaceHolderId> out) {
R_TRY(this->EnsureEnabled());
out.SetValue({util::GenerateUuid()});
return ResultSuccess();
R_SUCCEED();
}
Result ContentStorageImpl::CreatePlaceHolder(PlaceHolderId placeholder_id, ContentId content_id, s64 size) {
@@ -418,7 +418,7 @@ namespace ams::ncm {
bool has = false;
R_TRY(fs::HasFile(std::addressof(has), placeholder_path));
out.SetValue(has);
return ResultSuccess();
R_SUCCEED();
}
Result ContentStorageImpl::WritePlaceHolder(PlaceHolderId placeholder_id, s64 offset, const sf::InBuffer &data) {
@@ -446,7 +446,7 @@ namespace ams::ncm {
R_CONVERT(fs::ResultPathAlreadyExists, ncm::ResultContentAlreadyExists())
} R_END_TRY_CATCH;
return ResultSuccess();
R_SUCCEED();
}
Result ContentStorageImpl::Delete(ContentId content_id) {
@@ -466,7 +466,7 @@ namespace ams::ncm {
bool has = false;
R_TRY(fs::HasFile(std::addressof(has), content_path));
out.SetValue(has);
return ResultSuccess();
R_SUCCEED();
}
Result ContentStorageImpl::GetPath(sf::Out<Path> out, ContentId content_id) {
@@ -481,7 +481,7 @@ namespace ams::ncm {
R_TRY(fs::ConvertToFsCommonPath(common_path.str, sizeof(common_path.str), content_path));
out.SetValue(common_path);
return ResultSuccess();
R_SUCCEED();
}
Result ContentStorageImpl::GetPlaceHolderPath(sf::Out<Path> out, PlaceHolderId placeholder_id) {
@@ -496,7 +496,7 @@ namespace ams::ncm {
R_TRY(fs::ConvertToFsCommonPath(common_path.str, sizeof(common_path.str), placeholder_path));
out.SetValue(common_path);
return ResultSuccess();
R_SUCCEED();
}
Result ContentStorageImpl::CleanupAllPlaceHolder() {
@@ -511,7 +511,7 @@ namespace ams::ncm {
/* Cleanup the placeholder base directory. */
CleanDirectoryRecursively(placeholder_dir);
return ResultSuccess();
R_SUCCEED();
}
Result ContentStorageImpl::ListPlaceHolder(sf::Out<s32> out_count, const sf::OutArray<PlaceHolderId> &out_buf) {
@@ -542,11 +542,11 @@ namespace ams::ncm {
out_buf[entry_count++] = placeholder_id;
}
return ResultSuccess();
R_SUCCEED();
}));
out_count.SetValue(static_cast<s32>(entry_count));
return ResultSuccess();
R_SUCCEED();
}
Result ContentStorageImpl::GetContentCount(sf::Out<s32> out_count) {
@@ -571,11 +571,11 @@ namespace ams::ncm {
count++;
}
return ResultSuccess();
R_SUCCEED();
}));
out_count.SetValue(static_cast<s32>(count));
return ResultSuccess();
R_SUCCEED();
}
Result ContentStorageImpl::ListContentId(sf::Out<s32> out_count, const sf::OutArray<ContentId> &out, s32 offset) {
@@ -596,7 +596,7 @@ namespace ams::ncm {
/* If we run out of entries before reaching the desired offset, we're done. */
if (!dir_entry) {
out_count.SetValue(0);
return ResultSuccess();
R_SUCCEED();
}
/* If the current entry is a valid content id, advance. */
@@ -631,7 +631,7 @@ namespace ams::ncm {
/* Set the output count. */
*out_count = count;
return ResultSuccess();
R_SUCCEED();
}
Result ContentStorageImpl::GetSizeFromContentId(sf::Out<s64> out_size, ContentId content_id) {
@@ -651,14 +651,14 @@ namespace ams::ncm {
R_TRY(fs::GetFileSize(std::addressof(file_size), file));
out_size.SetValue(file_size);
return ResultSuccess();
R_SUCCEED();
}
Result ContentStorageImpl::DisableForcibly() {
m_disabled = true;
this->InvalidateFileCache();
m_placeholder_accessor.InvalidateAll();
return ResultSuccess();
R_SUCCEED();
}
Result ContentStorageImpl::RevertToPlaceHolder(PlaceHolderId placeholder_id, ContentId old_content_id, ContentId new_content_id) {
@@ -687,7 +687,7 @@ namespace ams::ncm {
R_CONVERT(fs::ResultPathAlreadyExists, ncm::ResultContentAlreadyExists())
} R_END_TRY_CATCH;
return ResultSuccess();
R_SUCCEED();
}
Result ContentStorageImpl::SetPlaceHolderSize(PlaceHolderId placeholder_id, s64 size) {
@@ -718,7 +718,7 @@ namespace ams::ncm {
/* Output the fs rights id. */
out_rights_id.SetValue(rights_id.id);
return ResultSuccess();
R_SUCCEED();
}
Result ContentStorageImpl::GetRightsIdFromPlaceHolderId(sf::Out<ncm::RightsId> out_rights_id, PlaceHolderId placeholder_id) {
@@ -739,7 +739,7 @@ namespace ams::ncm {
/* Output the fs rights id. */
out_rights_id.SetValue(rights_id.id);
return ResultSuccess();
R_SUCCEED();
}
Result ContentStorageImpl::GetRightsIdFromContentId(sf::Out<ncm::RightsId> out_rights_id, ContentId content_id) {
@@ -747,7 +747,7 @@ namespace ams::ncm {
/* Attempt to obtain the rights id from the cache. */
if (m_rights_id_cache->Find(out_rights_id.GetPointer(), content_id)) {
return ResultSuccess();
R_SUCCEED();
}
/* Get the path of the content. */
@@ -762,7 +762,7 @@ namespace ams::ncm {
m_rights_id_cache->Store(content_id, rights_id);
out_rights_id.SetValue(rights_id);
return ResultSuccess();
R_SUCCEED();
}
Result ContentStorageImpl::WriteContentForDebug(ContentId content_id, s64 offset, const sf::InBuffer &data) {
@@ -799,7 +799,7 @@ namespace ams::ncm {
Result ContentStorageImpl::FlushPlaceHolder() {
m_placeholder_accessor.InvalidateAll();
return ResultSuccess();
R_SUCCEED();
}
Result ContentStorageImpl::GetSizeFromPlaceHolderId(sf::Out<s64> out_size, PlaceHolderId placeholder_id) {
@@ -813,7 +813,7 @@ namespace ams::ncm {
/* Set the output if placeholder file is found. */
if (found) {
out_size.SetValue(file_size);
return ResultSuccess();
R_SUCCEED();
}
/* Get the path of the placeholder. */
@@ -829,7 +829,7 @@ namespace ams::ncm {
R_TRY(fs::GetFileSize(std::addressof(file_size), file));
out_size.SetValue(file_size);
return ResultSuccess();
R_SUCCEED();
}
Result ContentStorageImpl::RepairInvalidFileAttribute() {
@@ -850,7 +850,7 @@ namespace ams::ncm {
}
}
return ResultSuccess();
R_SUCCEED();
};
/* Fix content. */
@@ -872,7 +872,7 @@ namespace ams::ncm {
R_TRY(TraverseDirectory(path, GetHierarchicalContentDirectoryDepth(m_make_content_path_func), fix_file_attributes));
}
return ResultSuccess();
R_SUCCEED();
}
Result ContentStorageImpl::GetRightsIdFromPlaceHolderIdWithCache(sf::Out<ncm::RightsId> out_rights_id, PlaceHolderId placeholder_id, ContentId cache_content_id) {
@@ -880,7 +880,7 @@ namespace ams::ncm {
/* Attempt to find the rights id in the cache. */
if (m_rights_id_cache->Find(out_rights_id.GetPointer(), cache_content_id)) {
return ResultSuccess();
R_SUCCEED();
}
/* Get the placeholder path. */
@@ -898,16 +898,16 @@ namespace ams::ncm {
/* Set output. */
out_rights_id.SetValue(rights_id);
return ResultSuccess();
R_SUCCEED();
}
Result ContentStorageImpl::RegisterPath(const ContentId &content_id, const Path &path) {
AMS_UNUSED(content_id, path);
return ncm::ResultInvalidOperation();
R_THROW(ncm::ResultInvalidOperation());
}
Result ContentStorageImpl::ClearRegisteredPath() {
return ncm::ResultInvalidOperation();
R_THROW(ncm::ResultInvalidOperation());
}
}

View File

@@ -31,7 +31,7 @@ namespace ams::ncm {
/* Helpers. */
Result EnsureEnabled() const {
R_UNLESS(!m_disabled, ncm::ResultInvalidContentStorage());
return ResultSuccess();
R_SUCCEED();
}
static Result GetRightsId(ncm::RightsId *out_rights_id, const Path &path) {
@@ -41,7 +41,7 @@ namespace ams::ncm {
R_TRY(fs::GetRightsId(std::addressof(out_rights_id->id), path.str));
out_rights_id->key_generation = 0;
}
return ResultSuccess();
R_SUCCEED();
}
public:
/* Actual commands. */

View File

@@ -84,7 +84,7 @@ namespace ams::ncm::impl {
/* Flush the destination file. */
R_TRY(fs::FlushFile(dst_file));
return ResultSuccess();
R_SUCCEED();
}
}

View File

@@ -20,37 +20,37 @@ namespace ams::ncm {
Result HostContentStorageImpl::GeneratePlaceHolderId(sf::Out<PlaceHolderId> out) {
AMS_UNUSED(out);
return ncm::ResultNotSupported();
R_THROW(ncm::ResultNotSupported());
}
Result HostContentStorageImpl::CreatePlaceHolder(PlaceHolderId placeholder_id, ContentId content_id, s64 size) {
AMS_UNUSED(placeholder_id, content_id, size);
return ncm::ResultNotSupported();
R_THROW(ncm::ResultNotSupported());
}
Result HostContentStorageImpl::DeletePlaceHolder(PlaceHolderId placeholder_id) {
AMS_UNUSED(placeholder_id);
return ncm::ResultNotSupported();
R_THROW(ncm::ResultNotSupported());
}
Result HostContentStorageImpl::HasPlaceHolder(sf::Out<bool> out, PlaceHolderId placeholder_id) {
AMS_UNUSED(out, placeholder_id);
return ncm::ResultNotSupported();
R_THROW(ncm::ResultNotSupported());
}
Result HostContentStorageImpl::WritePlaceHolder(PlaceHolderId placeholder_id, s64 offset, const sf::InBuffer &data) {
AMS_UNUSED(placeholder_id, offset, data);
return ncm::ResultNotSupported();
R_THROW(ncm::ResultNotSupported());
}
Result HostContentStorageImpl::Register(PlaceHolderId placeholder_id, ContentId content_id) {
AMS_UNUSED(placeholder_id, content_id);
return ncm::ResultNotSupported();
R_THROW(ncm::ResultNotSupported());
}
Result HostContentStorageImpl::Delete(ContentId content_id) {
AMS_UNUSED(content_id);
return ncm::ResultNotSupported();
R_THROW(ncm::ResultNotSupported());
}
Result HostContentStorageImpl::Has(sf::Out<bool> out, ContentId content_id) {
@@ -62,12 +62,12 @@ namespace ams::ncm {
/* The content is absent, this is fine. */
R_CATCH(ncm::ResultContentNotFound) {
out.SetValue(false);
return ResultSuccess();
R_SUCCEED();
}
} R_END_TRY_CATCH;
out.SetValue(true);
return ResultSuccess();
R_SUCCEED();
}
Result HostContentStorageImpl::GetPath(sf::Out<Path> out, ContentId content_id) {
@@ -77,61 +77,61 @@ namespace ams::ncm {
Result HostContentStorageImpl::GetPlaceHolderPath(sf::Out<Path> out, PlaceHolderId placeholder_id) {
AMS_UNUSED(out, placeholder_id);
return ncm::ResultNotSupported();
R_THROW(ncm::ResultNotSupported());
}
Result HostContentStorageImpl::CleanupAllPlaceHolder() {
return ncm::ResultNotSupported();
R_THROW(ncm::ResultNotSupported());
}
Result HostContentStorageImpl::ListPlaceHolder(sf::Out<s32> out_count, const sf::OutArray<PlaceHolderId> &out_buf) {
AMS_UNUSED(out_count, out_buf);
return ncm::ResultNotSupported();
R_THROW(ncm::ResultNotSupported());
}
Result HostContentStorageImpl::GetContentCount(sf::Out<s32> out_count) {
AMS_UNUSED(out_count);
return ncm::ResultNotSupported();
R_THROW(ncm::ResultNotSupported());
}
Result HostContentStorageImpl::ListContentId(sf::Out<s32> out_count, const sf::OutArray<ContentId> &out_buf, s32 offset) {
AMS_UNUSED(out_count, out_buf, offset);
return ncm::ResultNotSupported();
R_THROW(ncm::ResultNotSupported());
}
Result HostContentStorageImpl::GetSizeFromContentId(sf::Out<s64> out_size, ContentId content_id) {
AMS_UNUSED(out_size, content_id);
return ncm::ResultInvalidOperation();
R_THROW(ncm::ResultInvalidOperation());
}
Result HostContentStorageImpl::DisableForcibly() {
m_disabled = true;
return ResultSuccess();
R_SUCCEED();
}
Result HostContentStorageImpl::RevertToPlaceHolder(PlaceHolderId placeholder_id, ContentId old_content_id, ContentId new_content_id) {
AMS_UNUSED(placeholder_id, old_content_id, new_content_id);
return ncm::ResultNotSupported();
R_THROW(ncm::ResultNotSupported());
}
Result HostContentStorageImpl::SetPlaceHolderSize(PlaceHolderId placeholder_id, s64 size) {
AMS_UNUSED(placeholder_id, size);
return ncm::ResultNotSupported();
R_THROW(ncm::ResultNotSupported());
}
Result HostContentStorageImpl::ReadContentIdFile(const sf::OutBuffer &buf, ContentId content_id, s64 offset) {
AMS_UNUSED(buf, content_id, offset);
return ncm::ResultInvalidOperation();
R_THROW(ncm::ResultInvalidOperation());
}
Result HostContentStorageImpl::GetRightsIdFromPlaceHolderIdDeprecated(sf::Out<ams::fs::RightsId> out_rights_id, PlaceHolderId placeholder_id) {
AMS_UNUSED(out_rights_id, placeholder_id);
return ncm::ResultNotSupported();
R_THROW(ncm::ResultNotSupported());
}
Result HostContentStorageImpl::GetRightsIdFromPlaceHolderId(sf::Out<ncm::RightsId> out_rights_id, PlaceHolderId placeholder_id) {
AMS_UNUSED(out_rights_id, placeholder_id);
return ncm::ResultNotSupported();
R_THROW(ncm::ResultNotSupported());
}
Result HostContentStorageImpl::GetRightsIdFromContentIdDeprecated(sf::Out<ams::fs::RightsId> out_rights_id, ContentId content_id) {
@@ -141,7 +141,7 @@ namespace ams::ncm {
/* Output the fs rights id. */
out_rights_id.SetValue(rights_id.id);
return ResultSuccess();
R_SUCCEED();
}
Result HostContentStorageImpl::GetRightsIdFromContentId(sf::Out<ncm::RightsId> out_rights_id, ContentId content_id) {
@@ -157,46 +157,46 @@ namespace ams::ncm {
/* The content is absent, output a blank rights id. */
R_CATCH(fs::ResultTargetNotFound) {
out_rights_id.SetValue({});
return ResultSuccess();
R_SUCCEED();
}
} R_END_TRY_CATCH;
/* Output the rights id. */
out_rights_id.SetValue(rights_id);
return ResultSuccess();
R_SUCCEED();
}
Result HostContentStorageImpl::WriteContentForDebug(ContentId content_id, s64 offset, const sf::InBuffer &data) {
AMS_UNUSED(content_id, offset, data);
return ncm::ResultNotSupported();
R_THROW(ncm::ResultNotSupported());
}
Result HostContentStorageImpl::GetFreeSpaceSize(sf::Out<s64> out_size) {
out_size.SetValue(0);
return ResultSuccess();
R_SUCCEED();
}
Result HostContentStorageImpl::GetTotalSpaceSize(sf::Out<s64> out_size) {
out_size.SetValue(0);
return ResultSuccess();
R_SUCCEED();
}
Result HostContentStorageImpl::FlushPlaceHolder() {
return ncm::ResultNotSupported();
R_THROW(ncm::ResultNotSupported());
}
Result HostContentStorageImpl::GetSizeFromPlaceHolderId(sf::Out<s64> out, PlaceHolderId placeholder_id) {
AMS_UNUSED(out, placeholder_id);
return ncm::ResultNotSupported();
R_THROW(ncm::ResultNotSupported());
}
Result HostContentStorageImpl::RepairInvalidFileAttribute() {
return ncm::ResultNotSupported();
R_THROW(ncm::ResultNotSupported());
}
Result HostContentStorageImpl::GetRightsIdFromPlaceHolderIdWithCache(sf::Out<ncm::RightsId> out_rights_id, PlaceHolderId placeholder_id, ContentId cache_content_id) {
AMS_UNUSED(out_rights_id, placeholder_id, cache_content_id);
return ncm::ResultNotSupported();
R_THROW(ncm::ResultNotSupported());
}
Result HostContentStorageImpl::RegisterPath(const ContentId &content_id, const Path &path) {
@@ -207,7 +207,7 @@ namespace ams::ncm {
Result HostContentStorageImpl::ClearRegisteredPath() {
AMS_ABORT_UNLESS(spl::IsDevelopment());
m_registered_content->ClearPaths();
return ResultSuccess();
R_SUCCEED();
}
}

View File

@@ -26,7 +26,7 @@ namespace ams::ncm {
/* Helpers. */
Result EnsureEnabled() const {
R_UNLESS(!m_disabled, ncm::ResultInvalidContentStorage());
return ResultSuccess();
R_SUCCEED();
}
static Result GetRightsId(ncm::RightsId *out_rights_id, const Path &path) {
@@ -36,7 +36,7 @@ namespace ams::ncm {
R_TRY(fs::GetRightsId(std::addressof(out_rights_id->id), path.str));
out_rights_id->key_generation = 0;
}
return ResultSuccess();
R_SUCCEED();
}
public:
HostContentStorageImpl(RegisteredHostContent *registered_content) : m_registered_content(registered_content), m_disabled(false) { /* ... */ }

View File

@@ -79,7 +79,7 @@ namespace ams::ncm {
Result InstallTaskBase::Prepare() {
R_TRY(this->SetLastResultOnFailure(this->PrepareImpl()));
return ResultSuccess();
R_SUCCEED();
}
Result InstallTaskBase::GetPreparedPlaceHolderPath(Path *out_path, u64 id, ContentMetaType meta_type, ContentType type) {
@@ -124,7 +124,7 @@ namespace ams::ncm {
/* Get the path. */
storage.GetPlaceHolderPath(out_path, *placeholder_id);
return ResultSuccess();
R_SUCCEED();
}
Result InstallTaskBase::CalculateRequiredSize(s64 *out_size) {
@@ -151,7 +151,7 @@ namespace ams::ncm {
}
*out_size = required_size;
return ResultSuccess();
R_SUCCEED();
}
Result InstallTaskBase::PrepareImpl() {
@@ -196,7 +196,7 @@ namespace ams::ncm {
R_TRY(m_data->Cleanup());
this->CleanupProgress();
return ResultSuccess();
R_SUCCEED();
}
Result InstallTaskBase::CleanupOne(const InstallContentMeta &content_meta) {
@@ -219,7 +219,7 @@ namespace ams::ncm {
}
}
return ResultSuccess();
R_SUCCEED();
}
Result InstallTaskBase::ListContentMetaKey(s32 *out_keys_written, StorageContentMetaKey *out_keys, s32 out_keys_count, s32 offset, ListContentMetaKeyFilter filter) {
@@ -230,7 +230,7 @@ namespace ams::ncm {
/* Offset exceeds keys that can be written. */
if (count <= offset) {
*out_keys_written = 0;
return ResultSuccess();
R_SUCCEED();
}
if (filter == ListContentMetaKeyFilter::All) {
@@ -284,7 +284,7 @@ namespace ams::ncm {
*out_keys_written = keys_written;
}
return ResultSuccess();
R_SUCCEED();
}
Result InstallTaskBase::ListApplicationContentMetaKey(s32 *out_keys_written, ApplicationContentMetaKey *out_keys, s32 out_keys_count, s32 offset) {
@@ -295,7 +295,7 @@ namespace ams::ncm {
/* Offset exceeds keys that can be written. */
if (count <= offset) {
*out_keys_written = 0;
return ResultSuccess();
R_SUCCEED();
}
/* Iterate over content meta. */
@@ -320,12 +320,12 @@ namespace ams::ncm {
}
*out_keys_written = keys_written;
return ResultSuccess();
R_SUCCEED();
}
Result InstallTaskBase::Execute() {
R_TRY(this->SetLastResultOnFailure(this->ExecuteImpl()));
return ResultSuccess();
R_SUCCEED();
}
Result InstallTaskBase::ExecuteImpl() {
@@ -376,7 +376,7 @@ namespace ams::ncm {
Result InstallTaskBase::PrepareAndExecute() {
R_TRY(this->SetLastResultOnFailure(this->PrepareImpl()));
R_TRY(this->SetLastResultOnFailure(this->ExecuteImpl()));
return ResultSuccess();
R_SUCCEED();
}
Result InstallTaskBase::VerifyAllNotCommitted(const StorageContentMetaKey *keys, s32 num_keys) {
@@ -407,7 +407,7 @@ namespace ams::ncm {
/* Ensure number of uncommitted keys equals the number of input keys. */
R_UNLESS(num_not_committed == num_keys, ncm::ResultListPartiallyNotCommitted());
return ResultSuccess();
R_SUCCEED();
}
Result InstallTaskBase::CommitImpl(const StorageContentMetaKey *keys, s32 num_keys) {
@@ -503,7 +503,7 @@ namespace ams::ncm {
this->SetProgressState(InstallProgressState::Committed);
}
return ResultSuccess();
R_SUCCEED();
}
Result InstallTaskBase::Commit(const StorageContentMetaKey *keys, s32 num_keys) {
@@ -526,12 +526,12 @@ namespace ams::ncm {
/* Check if the attributes are set for including the exfat driver. */
if (content_meta.GetReader().GetHeader()->attributes & ContentMetaAttribute_IncludesExFatDriver) {
*out = true;
return ResultSuccess();
R_SUCCEED();
}
}
*out = false;
return ResultSuccess();
R_SUCCEED();
}
Result InstallTaskBase::WritePlaceHolderBuffer(InstallContentInfo *content_info, const void *data, size_t data_size) {
@@ -553,7 +553,7 @@ namespace ams::ncm {
/* Update the hash for the new data. */
m_sha256_generator.Update(data, data_size);
return ResultSuccess();
R_SUCCEED();
}
Result InstallTaskBase::WritePlaceHolder(const ContentMetaKey &key, InstallContentInfo *content_info) {
@@ -603,7 +603,7 @@ namespace ams::ncm {
}
}
return ResultSuccess();
R_SUCCEED();
}
bool InstallTaskBase::IsNecessaryInstallTicket(const fs::RightsId &rights_id) {
@@ -794,7 +794,7 @@ namespace ams::ncm {
/* Push the content meta. */
m_data->Push(tmp_buffer.Get(), tmp_buffer.GetSize());
return ResultSuccess();
R_SUCCEED();
}
void InstallTaskBase::PrepareAgain() {
@@ -802,7 +802,7 @@ namespace ams::ncm {
}
Result InstallTaskBase::PrepareDependency() {
return ResultSuccess();
R_SUCCEED();
}
Result InstallTaskBase::PrepareSystemUpdateDependency() {
@@ -902,13 +902,13 @@ namespace ams::ncm {
/* If not rebootless, a reboot is required. */
if (!(content_meta_info.attributes & ContentMetaAttribute_Rebootless)) {
*out = SystemUpdateTaskApplyInfo::RequireReboot;
return ResultSuccess();
R_SUCCEED();
}
}
}
*out = SystemUpdateTaskApplyInfo::RequireNoReboot;
return ResultSuccess();
R_SUCCEED();
}
Result InstallTaskBase::PrepareContentMetaIfLatest(const ContentMetaKey &key) {
@@ -923,7 +923,7 @@ namespace ams::ncm {
R_TRY(this->PrepareContentMeta(install_content_meta_info, key, util::nullopt));
}
return ResultSuccess();
R_SUCCEED();
}
Result InstallTaskBase::IsNewerThanInstalled(bool *out, const ContentMetaKey &key) {
@@ -950,13 +950,13 @@ namespace ams::ncm {
/* Check if installed key is newer. */
if (latest_key.version >= key.version) {
*out = false;
return ResultSuccess();
R_SUCCEED();
}
}
/* Input key is newer. */
*out = true;
return ResultSuccess();
R_SUCCEED();
}
Result InstallTaskBase::CountInstallContentMetaData(s32 *out_count) {
@@ -1022,7 +1022,7 @@ namespace ams::ncm {
/* Set output. */
*out = std::move(install_meta_data);
return ResultSuccess();
R_SUCCEED();
}
InstallContentInfo InstallTaskBase::MakeInstallContentInfoFrom(const InstallContentMetaInfo &info, const PlaceHolderId &placeholder_id, util::optional<bool> is_tmp) {
@@ -1146,11 +1146,11 @@ namespace ams::ncm {
}
/* No need to look for any further keys. */
return ResultSuccess();
R_SUCCEED();
}
*out_size = 0;
return ResultSuccess();
R_SUCCEED();
}
Result InstallTaskBase::ReadContentMetaInfoList(s32 *out_count, std::unique_ptr<ContentMetaInfo[]> *out_meta_infos, const ContentMetaKey &key) {
@@ -1177,7 +1177,7 @@ namespace ams::ncm {
/* Delete the placeholder. */
content_storage.DeletePlaceHolder(placeholder_id);
return ResultSuccess();
R_SUCCEED();
}
Result InstallTaskBase::FindMaxRequiredApplicationVersion(u32 *out) {
@@ -1206,7 +1206,7 @@ namespace ams::ncm {
}
*out = max_version;
return ResultSuccess();
R_SUCCEED();
}
Result InstallTaskBase::ListOccupiedSize(s32 *out_written, InstallTaskOccupiedSize *out_list, s32 out_list_size, s32 offset) {
@@ -1263,7 +1263,7 @@ namespace ams::ncm {
/* Write the out count. */
*out_written = count;
return ResultSuccess();
R_SUCCEED();
}
void InstallTaskBase::SetProgressState(InstallProgressState state) {
@@ -1306,7 +1306,7 @@ namespace ams::ncm {
}
*out = max_version;
return ResultSuccess();
R_SUCCEED();
}
Result InstallTaskBase::CanContinue() {
@@ -1322,7 +1322,7 @@ namespace ams::ncm {
break;
}
return ResultSuccess();
R_SUCCEED();
}
Result InstallTaskBase::ListRightsIds(s32 *out_count, Span<RightsId> out_span, const ContentMetaKey &key, s32 offset) {
@@ -1348,7 +1348,7 @@ namespace ams::ncm {
}
}
return ncm::ResultContentMetaNotFound();
R_THROW(ncm::ResultContentMetaNotFound());
}
Result InstallTaskBase::ListRightsIdsByInstallContentMeta(s32 *out_count, Span<RightsId> out_span, const InstallContentMeta &content_meta, s32 offset) {
@@ -1356,7 +1356,7 @@ namespace ams::ncm {
/* Thus, we have nothing to list. */
if (offset > 0) {
*out_count = 0;
return ResultSuccess();
R_SUCCEED();
}
/* Create a reader. */
@@ -1391,6 +1391,6 @@ namespace ams::ncm {
/* Sort and remove duplicate ids from the output span. */
std::sort(out_span.begin(), out_span.end());
*out_count = std::distance(out_span.begin(), std::unique(out_span.begin(), out_span.end()));
return ResultSuccess();
R_SUCCEED();
}
}

View File

@@ -45,7 +45,7 @@ namespace ams::ncm {
/* Output the buffer and size. */
out->data = std::move(buffer);
out->size = data_size;
return ResultSuccess();
R_SUCCEED();
}
Result InstallTaskDataBase::Update(const InstallContentMeta &content_meta, s32 index) {
@@ -64,13 +64,13 @@ namespace ams::ncm {
/* If the id matches we are successful. */
if (content_meta.GetReader().GetKey().id == id) {
*out = true;
return ResultSuccess();
R_SUCCEED();
}
}
/* We didn't find the value. */
*out = false;
return ResultSuccess();
R_SUCCEED();
}
Result MemoryInstallTaskData::GetProgress(InstallProgress *out_progress) {
@@ -95,27 +95,27 @@ namespace ams::ncm {
}
*out_progress = install_progress;
return ResultSuccess();
R_SUCCEED();
}
Result MemoryInstallTaskData::GetSystemUpdateTaskApplyInfo(SystemUpdateTaskApplyInfo *out_info) {
*out_info = m_system_update_task_apply_info;
return ResultSuccess();
R_SUCCEED();
}
Result MemoryInstallTaskData::SetState(InstallProgressState state) {
m_state = state;
return ResultSuccess();
R_SUCCEED();
}
Result MemoryInstallTaskData::SetLastResult(Result result) {
m_last_result = result;
return ResultSuccess();
R_SUCCEED();
}
Result MemoryInstallTaskData::SetSystemUpdateTaskApplyInfo(SystemUpdateTaskApplyInfo info) {
m_system_update_task_apply_info = info;
return ResultSuccess();
R_SUCCEED();
}
Result MemoryInstallTaskData::Push(const void *data, size_t size) {
@@ -137,12 +137,12 @@ namespace ams::ncm {
/* Relinquish control over the memory allocated to the data holder. */
holder.release();
return ResultSuccess();
R_SUCCEED();
}
Result MemoryInstallTaskData::Count(s32 *out) {
*out = m_data_list.size();
return ResultSuccess();
R_SUCCEED();
}
Result MemoryInstallTaskData::GetSize(size_t *out_size, s32 index) {
@@ -151,7 +151,7 @@ namespace ams::ncm {
for (auto &data_holder : m_data_list) {
if (index == count++) {
*out_size = data_holder.size;
return ResultSuccess();
R_SUCCEED();
}
}
/* Out of bounds indexing is an unrecoverable error. */
@@ -165,7 +165,7 @@ namespace ams::ncm {
if (index == count++) {
R_UNLESS(out_size >= data_holder.size, ncm::ResultBufferInsufficient());
std::memcpy(out, data_holder.data.get(), data_holder.size);
return ResultSuccess();
R_SUCCEED();
}
}
/* Out of bounds indexing is an unrecoverable error. */
@@ -179,7 +179,7 @@ namespace ams::ncm {
if (index == count++) {
R_UNLESS(data_size == data_holder.size, ncm::ResultBufferInsufficient());
std::memcpy(data_holder.data.get(), data, data_size);
return ResultSuccess();
R_SUCCEED();
}
}
/* Out of bounds indexing is an unrecoverable error. */
@@ -200,7 +200,7 @@ namespace ams::ncm {
}
}
return ResultSuccess();
R_SUCCEED();
}
Result MemoryInstallTaskData::Cleanup() {
@@ -209,7 +209,7 @@ namespace ams::ncm {
m_data_list.pop_front();
delete data_holder;
}
return ResultSuccess();
R_SUCCEED();
}
Result FileInstallTaskData::Create(const char *path, s32 max_entries) {
@@ -257,12 +257,12 @@ namespace ams::ncm {
}
*out_progress = install_progress;
return ResultSuccess();
R_SUCCEED();
}
Result FileInstallTaskData::GetSystemUpdateTaskApplyInfo(SystemUpdateTaskApplyInfo *out_info) {
*out_info = m_header.system_update_task_apply_info;
return ResultSuccess();
R_SUCCEED();
}
Result FileInstallTaskData::SetState(InstallProgressState state) {
@@ -302,14 +302,14 @@ namespace ams::ncm {
Result FileInstallTaskData::Count(s32 *out) {
*out = m_header.count;
return ResultSuccess();
R_SUCCEED();
}
Result FileInstallTaskData::GetSize(size_t *out_size, s32 index) {
EntryInfo entry_info;
R_TRY(this->GetEntryInfo(std::addressof(entry_info), index));
*out_size = entry_info.size;
return ResultSuccess();
R_SUCCEED();
}
Result FileInstallTaskData::Get(s32 index, void *out, size_t out_size) {

View File

@@ -61,7 +61,7 @@ namespace ams::ncm {
out_entries_total.SetValue(entries_total);
out_entries_written.SetValue(entries_written);
return ResultSuccess();
R_SUCCEED();
}
Result OnMemoryContentMetaDatabaseImpl::GetLatestContentMetaKey(sf::Out<ContentMetaKey> out_key, u64 id) {
@@ -84,17 +84,17 @@ namespace ams::ncm {
R_UNLESS(found_key, ncm::ResultContentMetaNotFound());
out_key.SetValue(*found_key);
return ResultSuccess();
R_SUCCEED();
}
Result OnMemoryContentMetaDatabaseImpl::LookupOrphanContent(const sf::OutArray<bool> &out_orphaned, const sf::InArray<ContentId> &content_ids) {
AMS_UNUSED(out_orphaned, content_ids);
return ncm::ResultInvalidContentMetaDatabase();
R_THROW(ncm::ResultInvalidContentMetaDatabase());
}
Result OnMemoryContentMetaDatabaseImpl::Commit() {
R_TRY(this->EnsureEnabled());
return ResultSuccess();
R_SUCCEED();
}
}

View File

@@ -28,7 +28,7 @@ namespace ams::ncm {
Result PackageInstallTask::GetInstallContentMetaInfo(InstallContentMetaInfo *out_info, const ContentMetaKey &key) {
AMS_UNUSED(out_info, key);
return ncm::ResultContentNotFound();
R_THROW(ncm::ResultContentNotFound());
}
Result PackageInstallTask::PrepareInstallContentMetaData() {
@@ -57,7 +57,7 @@ namespace ams::ncm {
}
}
return ResultSuccess();
R_SUCCEED();
}
}

View File

@@ -22,7 +22,7 @@ namespace ams::ncm {
m_package_root.Assign(package_root_path);
m_buffer = buffer;
m_buffer_size = buffer_size;
return ResultSuccess();
R_SUCCEED();
}
Result PackageInstallTaskBase::OnWritePlaceHolder(const ContentMetaKey &key, InstallContentInfo *content_info) {
@@ -56,7 +56,7 @@ namespace ams::ncm {
R_TRY(this->WritePlaceHolderBuffer(content_info, m_buffer, size_read));
}
return ResultSuccess();
R_SUCCEED();
}
Result PackageInstallTaskBase::InstallTicket(const fs::RightsId &rights_id, ContentMetaType meta_type) {
@@ -104,7 +104,7 @@ namespace ams::ncm {
/* TODO: es::ImportTicket() */
/* TODO: How should es be handled without undesired effects? */
return ResultSuccess();
R_SUCCEED();
}
void PackageInstallTaskBase::CreateContentPath(PackagePath *out_path, ContentId content_id) {

View File

@@ -58,7 +58,7 @@ namespace ams::ncm {
}
}
return ResultSuccess();
R_SUCCEED();
}
Result PackageSystemDowngradeTask::Commit() {

View File

@@ -67,7 +67,7 @@ namespace ams::ncm {
/* Set the context path. */
m_context_path.Assign(context_path);
return ResultSuccess();
R_SUCCEED();
}
util::optional<ContentMetaKey> PackageSystemUpdateTask::GetSystemUpdateMetaKey() {
@@ -103,7 +103,7 @@ namespace ams::ncm {
/* Create a new install content meta info. */
*out = InstallContentMetaInfo::MakeUnverifiable(info.GetId(), info.GetSize(), key);
return ResultSuccess();
R_SUCCEED();
}
Result PackageSystemUpdateTask::PrepareInstallContentMetaData() {
@@ -140,12 +140,12 @@ namespace ams::ncm {
/* Check if the info is for meta content. */
if (info.GetType() == ContentType::Meta) {
*out = info;
return ResultSuccess();
R_SUCCEED();
}
}
/* Not found. */
return ncm::ResultContentInfoNotFound();
R_THROW(ncm::ResultContentInfoNotFound());
}
}

View File

@@ -72,7 +72,7 @@ namespace ams::ncm {
}
*out = placeholder_id;
return ResultSuccess();
R_SUCCEED();
}
Result PlaceHolderAccessor::Open(fs::FileHandle *out_handle, PlaceHolderId placeholder_id) {
@@ -176,7 +176,7 @@ namespace ams::ncm {
R_CONVERT(fs::ResultPathAlreadyExists, ncm::ResultPlaceHolderAlreadyExists())
} R_END_TRY_CATCH;
return ResultSuccess();
R_SUCCEED();
}
Result PlaceHolderAccessor::DeletePlaceHolderFile(PlaceHolderId placeholder_id) {
@@ -189,7 +189,7 @@ namespace ams::ncm {
R_CONVERT(fs::ResultPathNotFound, ncm::ResultPlaceHolderNotFound())
} R_END_TRY_CATCH;
return ResultSuccess();
R_SUCCEED();
}
Result PlaceHolderAccessor::WritePlaceHolderFile(PlaceHolderId placeholder_id, s64 offset, const void *buffer, size_t size) {
@@ -234,7 +234,7 @@ namespace ams::ncm {
*found_in_cache = false;
}
return ResultSuccess();
R_SUCCEED();
}
void PlaceHolderAccessor::InvalidateAll() {

View File

@@ -48,7 +48,7 @@ namespace ams::ncm {
}
} R_END_TRY_CATCH;
return ResultSuccess();
R_SUCCEED();
}
}
@@ -57,42 +57,42 @@ namespace ams::ncm {
R_TRY(this->EnsureEnabled());
m_root_path.Assign(path);
m_make_content_path_func = content_path_func;
return ResultSuccess();
R_SUCCEED();
}
Result ReadOnlyContentStorageImpl::GeneratePlaceHolderId(sf::Out<PlaceHolderId> out) {
AMS_UNUSED(out);
return ncm::ResultNotSupported();
R_THROW(ncm::ResultNotSupported());
}
Result ReadOnlyContentStorageImpl::CreatePlaceHolder(PlaceHolderId placeholder_id, ContentId content_id, s64 size) {
AMS_UNUSED(placeholder_id, content_id, size);
return ncm::ResultNotSupported();
R_THROW(ncm::ResultNotSupported());
}
Result ReadOnlyContentStorageImpl::DeletePlaceHolder(PlaceHolderId placeholder_id) {
AMS_UNUSED(placeholder_id);
return ncm::ResultNotSupported();
R_THROW(ncm::ResultNotSupported());
}
Result ReadOnlyContentStorageImpl::HasPlaceHolder(sf::Out<bool> out, PlaceHolderId placeholder_id) {
AMS_UNUSED(out, placeholder_id);
return ncm::ResultNotSupported();
R_THROW(ncm::ResultNotSupported());
}
Result ReadOnlyContentStorageImpl::WritePlaceHolder(PlaceHolderId placeholder_id, s64 offset, const sf::InBuffer &data) {
AMS_UNUSED(placeholder_id, offset, data);
return ncm::ResultNotSupported();
R_THROW(ncm::ResultNotSupported());
}
Result ReadOnlyContentStorageImpl::Register(PlaceHolderId placeholder_id, ContentId content_id) {
AMS_UNUSED(placeholder_id, content_id);
return ncm::ResultNotSupported();
R_THROW(ncm::ResultNotSupported());
}
Result ReadOnlyContentStorageImpl::Delete(ContentId content_id) {
AMS_UNUSED(content_id);
return ncm::ResultNotSupported();
R_THROW(ncm::ResultNotSupported());
}
Result ReadOnlyContentStorageImpl::Has(sf::Out<bool> out, ContentId content_id) {
@@ -113,7 +113,7 @@ namespace ams::ncm {
}
out.SetValue(has);
return ResultSuccess();
R_SUCCEED();
}
Result ReadOnlyContentStorageImpl::GetPath(sf::Out<Path> out, ContentId content_id) {
@@ -137,31 +137,31 @@ namespace ams::ncm {
R_TRY(fs::ConvertToFsCommonPath(common_path.str, sizeof(common_path.str), content_path));
out.SetValue(common_path);
return ResultSuccess();
R_SUCCEED();
}
Result ReadOnlyContentStorageImpl::GetPlaceHolderPath(sf::Out<Path> out, PlaceHolderId placeholder_id) {
AMS_UNUSED(out, placeholder_id);
return ncm::ResultNotSupported();
R_THROW(ncm::ResultNotSupported());
}
Result ReadOnlyContentStorageImpl::CleanupAllPlaceHolder() {
return ncm::ResultNotSupported();
R_THROW(ncm::ResultNotSupported());
}
Result ReadOnlyContentStorageImpl::ListPlaceHolder(sf::Out<s32> out_count, const sf::OutArray<PlaceHolderId> &out_buf) {
AMS_UNUSED(out_count, out_buf);
return ncm::ResultNotSupported();
R_THROW(ncm::ResultNotSupported());
}
Result ReadOnlyContentStorageImpl::GetContentCount(sf::Out<s32> out_count) {
AMS_UNUSED(out_count);
return ncm::ResultNotSupported();
R_THROW(ncm::ResultNotSupported());
}
Result ReadOnlyContentStorageImpl::ListContentId(sf::Out<s32> out_count, const sf::OutArray<ContentId> &out_buf, s32 offset) {
AMS_UNUSED(out_count, out_buf, offset);
return ncm::ResultNotSupported();
R_THROW(ncm::ResultNotSupported());
}
Result ReadOnlyContentStorageImpl::GetSizeFromContentId(sf::Out<s64> out_size, ContentId content_id) {
@@ -177,22 +177,22 @@ namespace ams::ncm {
R_TRY(fs::GetFileSize(std::addressof(file_size), file));
out_size.SetValue(file_size);
return ResultSuccess();
R_SUCCEED();
}
Result ReadOnlyContentStorageImpl::DisableForcibly() {
m_disabled = true;
return ResultSuccess();
R_SUCCEED();
}
Result ReadOnlyContentStorageImpl::RevertToPlaceHolder(PlaceHolderId placeholder_id, ContentId old_content_id, ContentId new_content_id) {
AMS_UNUSED(placeholder_id, old_content_id, new_content_id);
return ncm::ResultNotSupported();
R_THROW(ncm::ResultNotSupported());
}
Result ReadOnlyContentStorageImpl::SetPlaceHolderSize(PlaceHolderId placeholder_id, s64 size) {
AMS_UNUSED(placeholder_id, size);
return ncm::ResultNotSupported();
R_THROW(ncm::ResultNotSupported());
}
Result ReadOnlyContentStorageImpl::ReadContentIdFile(const sf::OutBuffer &buf, ContentId content_id, s64 offset) {
@@ -208,17 +208,17 @@ namespace ams::ncm {
/* Read from the given offset up to the given size. */
R_TRY(fs::ReadFile(file, offset, buf.GetPointer(), buf.GetSize()));
return ResultSuccess();
R_SUCCEED();
}
Result ReadOnlyContentStorageImpl::GetRightsIdFromPlaceHolderIdDeprecated(sf::Out<ams::fs::RightsId> out_rights_id, PlaceHolderId placeholder_id) {
AMS_UNUSED(out_rights_id, placeholder_id);
return ncm::ResultNotSupported();
R_THROW(ncm::ResultNotSupported());
}
Result ReadOnlyContentStorageImpl::GetRightsIdFromPlaceHolderId(sf::Out<ncm::RightsId> out_rights_id, PlaceHolderId placeholder_id) {
AMS_UNUSED(out_rights_id, placeholder_id);
return ncm::ResultNotSupported();
R_THROW(ncm::ResultNotSupported());
}
Result ReadOnlyContentStorageImpl::GetRightsIdFromContentIdDeprecated(sf::Out<ams::fs::RightsId> out_rights_id, ContentId content_id) {
@@ -228,7 +228,7 @@ namespace ams::ncm {
/* Output the fs rights id. */
out_rights_id.SetValue(rights_id.id);
return ResultSuccess();
R_SUCCEED();
}
Result ReadOnlyContentStorageImpl::GetRightsIdFromContentId(sf::Out<ncm::RightsId> out_rights_id, ContentId content_id) {
@@ -243,49 +243,49 @@ namespace ams::ncm {
R_TRY(GetRightsId(std::addressof(rights_id), path));
out_rights_id.SetValue(rights_id);
return ResultSuccess();
R_SUCCEED();
}
Result ReadOnlyContentStorageImpl::WriteContentForDebug(ContentId content_id, s64 offset, const sf::InBuffer &data) {
AMS_UNUSED(content_id, offset, data);
return ncm::ResultNotSupported();
R_THROW(ncm::ResultNotSupported());
}
Result ReadOnlyContentStorageImpl::GetFreeSpaceSize(sf::Out<s64> out_size) {
out_size.SetValue(0);
return ResultSuccess();
R_SUCCEED();
}
Result ReadOnlyContentStorageImpl::GetTotalSpaceSize(sf::Out<s64> out_size) {
out_size.SetValue(0);
return ResultSuccess();
R_SUCCEED();
}
Result ReadOnlyContentStorageImpl::FlushPlaceHolder() {
return ncm::ResultNotSupported();
R_THROW(ncm::ResultNotSupported());
}
Result ReadOnlyContentStorageImpl::GetSizeFromPlaceHolderId(sf::Out<s64> out, PlaceHolderId placeholder_id) {
AMS_UNUSED(out, placeholder_id);
return ncm::ResultNotSupported();
R_THROW(ncm::ResultNotSupported());
}
Result ReadOnlyContentStorageImpl::RepairInvalidFileAttribute() {
return ncm::ResultNotSupported();
R_THROW(ncm::ResultNotSupported());
}
Result ReadOnlyContentStorageImpl::GetRightsIdFromPlaceHolderIdWithCache(sf::Out<ncm::RightsId> out_rights_id, PlaceHolderId placeholder_id, ContentId cache_content_id) {
AMS_UNUSED(out_rights_id, placeholder_id, cache_content_id);
return ncm::ResultNotSupported();
R_THROW(ncm::ResultNotSupported());
}
Result ReadOnlyContentStorageImpl::RegisterPath(const ContentId &content_id, const Path &path) {
AMS_UNUSED(content_id, path);
return ncm::ResultInvalidOperation();
R_THROW(ncm::ResultInvalidOperation());
}
Result ReadOnlyContentStorageImpl::ClearRegisteredPath() {
return ncm::ResultInvalidOperation();
R_THROW(ncm::ResultInvalidOperation());
}
}

View File

@@ -52,7 +52,7 @@ namespace ams::ncm {
for (auto &registered_path : m_path_list) {
if (registered_path.GetContentId() == content_id) {
registered_path.SetPath(path);
return ResultSuccess();
R_SUCCEED();
}
}
@@ -62,7 +62,7 @@ namespace ams::ncm {
/* Insert the path into the list. */
m_path_list.push_back(*registered_path);
return ResultSuccess();
R_SUCCEED();
}
Result RegisteredHostContent::GetPath(Path *out, const ncm::ContentId &content_id) {
@@ -72,10 +72,10 @@ namespace ams::ncm {
for (const auto &registered_path : m_path_list) {
if (registered_path.GetContentId() == content_id) {
registered_path.GetPath(out);
return ResultSuccess();
R_SUCCEED();
}
}
return ncm::ResultContentNotFound();
R_THROW(ncm::ResultContentNotFound());
}
void RegisteredHostContent::ClearPaths() {

View File

@@ -51,7 +51,7 @@ namespace ams::ncm {
R_TRY(::ncmOpenContentStorage(std::addressof(cs), static_cast<NcmStorageId>(storage_id)));
out.SetValue(ObjectFactory::CreateSharedEmplaced<IContentStorage, RemoteContentStorageImpl>(cs));
return ResultSuccess();
R_SUCCEED();
}
Result OpenContentMetaDatabase(sf::Out<sf::SharedPointer<IContentMetaDatabase>> out, StorageId storage_id) {
@@ -59,7 +59,7 @@ namespace ams::ncm {
R_TRY(::ncmOpenContentMetaDatabase(std::addressof(db), static_cast<NcmStorageId>(storage_id)));
out.SetValue(ObjectFactory::CreateSharedEmplaced<IContentMetaDatabase, RemoteContentMetaDatabaseImpl>(db));
return ResultSuccess();
R_SUCCEED();
}
Result CloseContentStorageForcibly(StorageId storage_id) {

View File

@@ -141,7 +141,7 @@ namespace ams::ncm {
static_assert(sizeof(*out_rights_id.GetPointer()) <= sizeof(rights_id));
std::memcpy(out_rights_id.GetPointer(), std::addressof(rights_id), sizeof(*out_rights_id.GetPointer()));
return ResultSuccess();
R_SUCCEED();
}
Result GetRightsIdFromPlaceHolderId(sf::Out<ncm::RightsId> out_rights_id, PlaceHolderId placeholder_id) {
@@ -150,7 +150,7 @@ namespace ams::ncm {
static_assert(sizeof(*out_rights_id.GetPointer()) <= sizeof(rights_id));
std::memcpy(out_rights_id.GetPointer(), std::addressof(rights_id), sizeof(*out_rights_id.GetPointer()));
return ResultSuccess();
R_SUCCEED();
}
Result GetRightsIdFromContentIdDeprecated(sf::Out<ams::fs::RightsId> out_rights_id, ContentId content_id) {
@@ -159,7 +159,7 @@ namespace ams::ncm {
static_assert(sizeof(*out_rights_id.GetPointer()) <= sizeof(rights_id));
std::memcpy(out_rights_id.GetPointer(), std::addressof(rights_id), sizeof(*out_rights_id.GetPointer()));
return ResultSuccess();
R_SUCCEED();
}
Result GetRightsIdFromContentId(sf::Out<ncm::RightsId> out_rights_id, ContentId content_id) {
@@ -168,7 +168,7 @@ namespace ams::ncm {
static_assert(sizeof(*out_rights_id.GetPointer()) <= sizeof(rights_id));
std::memcpy(out_rights_id.GetPointer(), std::addressof(rights_id), sizeof(*out_rights_id.GetPointer()));
return ResultSuccess();
R_SUCCEED();
}
Result WriteContentForDebug(ContentId content_id, s64 offset, const sf::InBuffer &data) {

View File

@@ -45,10 +45,10 @@ namespace ams::ncm {
/* Output the storage id. */
*out_storage_id = storage_id;
return ResultSuccess();
R_SUCCEED();
}
return ncm::ResultNotEnoughInstallSpace();
R_THROW(ncm::ResultNotEnoughInstallSpace());
}
Result SelectPatchStorage(StorageId *out_storage_id, StorageId storage_id, PatchId patch_id) {
@@ -77,7 +77,7 @@ namespace ams::ncm {
}
}
return ResultSuccess();
R_SUCCEED();
}
const char *GetStorageIdString(StorageId storage_id) {

View File

@@ -47,7 +47,7 @@ namespace ams::ncm {
/* Initialize members. */
m_mount_name = mount_name;
return ResultSuccess();
R_SUCCEED();
}
const impl::MountName &GetMountName() const {
@@ -70,7 +70,7 @@ namespace ams::ncm {
/* Initialize parent. N doesn't check the result. */
PackageInstallTask::Initialize(impl::GetRootDirectoryPath(m_impl->GetMountName()).str, storage_id, buffer, buffer_size, ignore_ticket);
return ResultSuccess();
R_SUCCEED();
}
}