Remove debug code (again)

This commit is contained in:
Adubbz
2019-08-08 18:24:56 +10:00
parent 1aa4c12e5e
commit 168447d80e
15 changed files with 0 additions and 565 deletions

View File

@@ -18,12 +18,9 @@
#include "ncm_path_utils.hpp"
#include "ncm_readonlycontentstorage.hpp"
#include "debug.hpp"
namespace sts::ncm {
Result ReadOnlyContentStorageInterface::Initialize(const char* root_path, MakeContentPathFunc content_path_func) {
R_DEBUG_START
R_TRY(this->EnsureEnabled());
const size_t root_path_len = strnlen(root_path, FS_MAX_PATH-1);
@@ -35,53 +32,37 @@ namespace sts::ncm {
strncpy(this->root_path, root_path, FS_MAX_PATH-2);
this->make_content_path_func = *content_path_func;
return ResultSuccess;
R_DEBUG_END
}
Result ReadOnlyContentStorageInterface::GeneratePlaceHolderId(Out<PlaceHolderId> out) {
R_DEBUG_START
return ResultNcmInvalidContentStorageOperation;
R_DEBUG_END
}
Result ReadOnlyContentStorageInterface::CreatePlaceHolder(PlaceHolderId placeholder_id, ContentId content_id, u64 size) {
R_DEBUG_START
return ResultNcmInvalidContentStorageOperation;
R_DEBUG_END
}
Result ReadOnlyContentStorageInterface::DeletePlaceHolder(PlaceHolderId placeholder_id) {
R_DEBUG_START
return ResultNcmInvalidContentStorageOperation;
R_DEBUG_END
}
Result ReadOnlyContentStorageInterface::HasPlaceHolder(Out<bool> out, PlaceHolderId placeholder_id) {
R_DEBUG_START
return ResultNcmInvalidContentStorageOperation;
R_DEBUG_END
}
Result ReadOnlyContentStorageInterface::WritePlaceHolder(PlaceHolderId placeholder_id, u64 offset, InBuffer<u8> data) {
R_DEBUG_START
return ResultNcmInvalidContentStorageOperation;
R_DEBUG_END
}
Result ReadOnlyContentStorageInterface::Register(PlaceHolderId placeholder_id, ContentId content_id) {
R_DEBUG_START
return ResultNcmInvalidContentStorageOperation;
R_DEBUG_END
}
Result ReadOnlyContentStorageInterface::Delete(ContentId content_id) {
R_DEBUG_START
return ResultNcmInvalidContentStorageOperation;
R_DEBUG_END
}
Result ReadOnlyContentStorageInterface::Has(Out<bool> out, ContentId content_id) {
R_DEBUG_START
R_TRY(this->EnsureEnabled());
char content_path[FS_MAX_PATH] = {0};
@@ -97,11 +78,9 @@ namespace sts::ncm {
out.SetValue(has);
return ResultSuccess;
R_DEBUG_END
}
Result ReadOnlyContentStorageInterface::GetPath(OutPointerWithServerSize<lr::Path, 0x1> out, ContentId content_id) {
R_DEBUG_START
R_TRY(this->EnsureEnabled());
char content_path[FS_MAX_PATH] = {0};
@@ -119,41 +98,29 @@ namespace sts::ncm {
*out.pointer = common_path;
return ResultSuccess;
R_DEBUG_END
}
Result ReadOnlyContentStorageInterface::GetPlaceHolderPath(OutPointerWithServerSize<lr::Path, 0x1> out, PlaceHolderId placeholder_id) {
R_DEBUG_START
return ResultNcmInvalidContentStorageOperation;
R_DEBUG_END
}
Result ReadOnlyContentStorageInterface::CleanupAllPlaceHolder() {
R_DEBUG_START
return ResultNcmInvalidContentStorageOperation;
R_DEBUG_END
}
Result ReadOnlyContentStorageInterface::ListPlaceHolder(Out<u32> out_count, OutBuffer<PlaceHolderId> out_buf) {
R_DEBUG_START
return ResultNcmInvalidContentStorageOperation;
R_DEBUG_END
}
Result ReadOnlyContentStorageInterface::GetContentCount(Out<u32> out_count) {
R_DEBUG_START
return ResultNcmInvalidContentStorageOperation;
R_DEBUG_END
}
Result ReadOnlyContentStorageInterface::ListContentId(Out<u32> out_count, OutBuffer<ContentId> out_buf, u32 start_offset) {
R_DEBUG_START
return ResultNcmInvalidContentStorageOperation;
R_DEBUG_END
}
Result ReadOnlyContentStorageInterface::GetSizeFromContentId(Out<u64> out_size, ContentId content_id) {
R_DEBUG_START
R_TRY(this->EnsureEnabled());
char content_path[FS_MAX_PATH] = {0};
@@ -173,30 +140,22 @@ namespace sts::ncm {
out_size.SetValue(st.st_size);
return ResultSuccess;
R_DEBUG_END
}
Result ReadOnlyContentStorageInterface::DisableForcibly() {
R_DEBUG_START
this->disabled = true;
return ResultSuccess;
R_DEBUG_END
}
Result ReadOnlyContentStorageInterface::RevertToPlaceHolder(PlaceHolderId placeholder_id, ContentId old_content_id, ContentId new_content_id) {
R_DEBUG_START
return ResultNcmInvalidContentStorageOperation;
R_DEBUG_END
}
Result ReadOnlyContentStorageInterface::SetPlaceHolderSize(PlaceHolderId placeholder_id, u64 size) {
R_DEBUG_START
return ResultNcmInvalidContentStorageOperation;
R_DEBUG_END
}
Result ReadOnlyContentStorageInterface::ReadContentIdFile(OutBuffer<u8> buf, ContentId content_id, u64 offset) {
R_DEBUG_START
/* Offset is too large */
if (offset >> 0x3f != 0) {
return ResultNcmInvalidOffset;
@@ -224,17 +183,13 @@ namespace sts::ncm {
R_TRY(ReadFile(f, offset, buf.buffer, buf.num_elements));
return ResultSuccess;
R_DEBUG_END
}
Result ReadOnlyContentStorageInterface::GetRightsIdFromPlaceHolderId(Out<FsRightsId> out_rights_id, Out<u64> out_key_generation, PlaceHolderId placeholder_id) {
R_DEBUG_START
return ResultNcmInvalidContentStorageOperation;
R_DEBUG_END
}
Result ReadOnlyContentStorageInterface::GetRightsIdFromContentId(Out<FsRightsId> out_rights_id, Out<u64> out_key_generation, ContentId content_id) {
R_DEBUG_START
R_TRY(this->EnsureEnabled());
FsRightsId rights_id = {0};
@@ -258,51 +213,36 @@ namespace sts::ncm {
out_key_generation.SetValue(static_cast<u64>(key_generation));
return ResultSuccess;
R_DEBUG_END
}
Result ReadOnlyContentStorageInterface::WriteContentForDebug(ContentId content_id, u64 offset, InBuffer<u8> data) {
R_DEBUG_START
return ResultNcmInvalidContentStorageOperation;
R_DEBUG_END
}
Result ReadOnlyContentStorageInterface::GetFreeSpaceSize(Out<u64> out_size) {
R_DEBUG_START
out_size.SetValue(0);
return ResultSuccess;
R_DEBUG_END
}
Result ReadOnlyContentStorageInterface::GetTotalSpaceSize(Out<u64> out_size) {
R_DEBUG_START
out_size.SetValue(0);
return ResultSuccess;
R_DEBUG_END
}
Result ReadOnlyContentStorageInterface::FlushPlaceHolder() {
R_DEBUG_START
return ResultNcmInvalidContentStorageOperation;
R_DEBUG_END
}
Result ReadOnlyContentStorageInterface::GetSizeFromPlaceHolderId(Out<u64> out, PlaceHolderId placeholder_id) {
R_DEBUG_START
return ResultNcmInvalidContentStorageOperation;
R_DEBUG_END
}
Result ReadOnlyContentStorageInterface::RepairInvalidFileAttribute() {
R_DEBUG_START
return ResultNcmInvalidContentStorageOperation;
R_DEBUG_END
}
Result ReadOnlyContentStorageInterface::GetRightsIdFromPlaceHolderIdWithCache(Out<FsRightsId> out_rights_id, Out<u64> out_key_generation, PlaceHolderId placeholder_id, ContentId cache_content_id) {
R_DEBUG_START
return ResultNcmInvalidContentStorageOperation;
R_DEBUG_END
}
}