From 1bfd0abb6a9e64567b4bba65b4509249cb32b739 Mon Sep 17 00:00:00 2001 From: jakcron Date: Wed, 11 Jul 2018 20:01:13 +0800 Subject: [PATCH] [nx|nstool] Fix typo. --- .../nx/ApplicationControlPropertyBinary.h | 6 +++--- lib/libnx/include/nx/nacp.h | 2 +- .../ApplicationControlPropertyBinary.cpp | 18 +++++++++--------- programs/nstool/source/NacpProcess.cpp | 2 +- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/lib/libnx/include/nx/ApplicationControlPropertyBinary.h b/lib/libnx/include/nx/ApplicationControlPropertyBinary.h index ed5a96d..3dcc41a 100644 --- a/lib/libnx/include/nx/ApplicationControlPropertyBinary.h +++ b/lib/libnx/include/nx/ApplicationControlPropertyBinary.h @@ -197,8 +197,8 @@ namespace nx int64_t getCacheStorageDataAndJournalSizeMax() const; void setCacheStorageDataAndJournalSizeMax(int64_t var); - uint16_t getCacheStorageIndex() const; - void setCacheStorageIndex(uint16_t var); + uint16_t getCacheStorageIndexMax() const; + void setCacheStorageIndexMax(uint16_t var); const fnd::List& getPlayLogQueryableApplicationId() const; void setPlayLogQueryableApplicationId(const fnd::List& var); @@ -253,7 +253,7 @@ namespace nx int64_t mTemporaryStorageSize; sStorageSize mCacheStorageSize; int64_t mCacheStorageDataAndJournalSizeMax; - uint16_t mCacheStorageIndex; + uint16_t mCacheStorageIndexMax; fnd::List mPlayLogQueryableApplicationId; nacp::PlayLogQueryCapability mPlayLogQueryCapability; nacp::RepairFlag mRepairFlag; diff --git a/lib/libnx/include/nx/nacp.h b/lib/libnx/include/nx/nacp.h index c319395..bbb7019 100644 --- a/lib/libnx/include/nx/nacp.h +++ b/lib/libnx/include/nx/nacp.h @@ -208,7 +208,7 @@ namespace nx le_uint64_t cache_storage_size; le_uint64_t cache_storage_journal_size; le_uint64_t cache_storage_data_and_journal_size_max; - le_uint16_t cache_storage_index; + le_uint16_t cache_storage_index_max; byte_t reserved_03[6]; le_uint64_t play_log_queryable_application_id[nacp::kPlayLogQueryableApplicationIdCount]; byte_t play_log_query_capability; diff --git a/lib/libnx/source/ApplicationControlPropertyBinary.cpp b/lib/libnx/source/ApplicationControlPropertyBinary.cpp index 5edb57b..25dfa64 100644 --- a/lib/libnx/source/ApplicationControlPropertyBinary.cpp +++ b/lib/libnx/source/ApplicationControlPropertyBinary.cpp @@ -46,7 +46,7 @@ void nx::ApplicationControlPropertyBinary::operator=(const ApplicationControlPro mTemporaryStorageSize = other.mTemporaryStorageSize; mCacheStorageSize = other.mCacheStorageSize; mCacheStorageDataAndJournalSizeMax = other.mCacheStorageDataAndJournalSizeMax; - mCacheStorageIndex = other.mCacheStorageIndex; + mCacheStorageIndexMax = other.mCacheStorageIndexMax; mPlayLogQueryableApplicationId = other.mPlayLogQueryableApplicationId; mPlayLogQueryCapability = other.mPlayLogQueryCapability; mRepairFlag = other.mRepairFlag; @@ -88,7 +88,7 @@ bool nx::ApplicationControlPropertyBinary::operator==(const ApplicationControlPr && (mTemporaryStorageSize == other.mTemporaryStorageSize) \ && (mCacheStorageSize == other.mCacheStorageSize) \ && (mCacheStorageDataAndJournalSizeMax == other.mCacheStorageDataAndJournalSizeMax) \ - && (mCacheStorageIndex == other.mCacheStorageIndex) \ + && (mCacheStorageIndexMax == other.mCacheStorageIndexMax) \ && (mPlayLogQueryableApplicationId == other.mPlayLogQueryableApplicationId) \ && (mPlayLogQueryCapability == other.mPlayLogQueryCapability) \ && (mRepairFlag == other.mRepairFlag) \ @@ -157,7 +157,7 @@ void nx::ApplicationControlPropertyBinary::toBytes() { data->play_log_queryable_application_id[i] = mPlayLogQueryableApplicationId[i]; } - data->cache_storage_index = mCacheStorageIndex; + data->cache_storage_index = mCacheStorageIndexMax; data->program_index = mProgramIndex; // sizes @@ -245,7 +245,7 @@ void nx::ApplicationControlPropertyBinary::fromBytes(const byte_t* bytes, size_t if (data->play_log_queryable_application_id[i].get() != 0) mPlayLogQueryableApplicationId.addElement(data->play_log_queryable_application_id[i].get()); } - mCacheStorageIndex = data->cache_storage_index.get(); + mCacheStorageIndexMax = data->cache_storage_index.get(); mProgramIndex = data->program_index; // sizes @@ -305,7 +305,7 @@ void nx::ApplicationControlPropertyBinary::clear() mTemporaryStorageSize = 0; mCacheStorageSize = {0, 0}; mCacheStorageDataAndJournalSizeMax = 0; - mCacheStorageIndex = 0; + mCacheStorageIndexMax = 0; mPlayLogQueryableApplicationId.clear(); mPlayLogQueryCapability = nacp::PLQC_None; mRepairFlag = nacp::REPF_None; @@ -642,14 +642,14 @@ void nx::ApplicationControlPropertyBinary::setCacheStorageDataAndJournalSizeMax( mCacheStorageDataAndJournalSizeMax = var; } -uint16_t nx::ApplicationControlPropertyBinary::getCacheStorageIndex() const +uint16_t nx::ApplicationControlPropertyBinary::getCacheStorageIndexMax() const { - return mCacheStorageIndex; + return mCacheStorageIndexMax; } -void nx::ApplicationControlPropertyBinary::setCacheStorageIndex(uint16_t var) +void nx::ApplicationControlPropertyBinary::setCacheStorageIndexMax(uint16_t var) { - mCacheStorageIndex = var; + mCacheStorageIndexMax = var; } const fnd::List& nx::ApplicationControlPropertyBinary::getPlayLogQueryableApplicationId() const diff --git a/programs/nstool/source/NacpProcess.cpp b/programs/nstool/source/NacpProcess.cpp index 2c87992..dfbe51a 100644 --- a/programs/nstool/source/NacpProcess.cpp +++ b/programs/nstool/source/NacpProcess.cpp @@ -569,7 +569,7 @@ void NacpProcess::displayNacp() printf(" Size: %s\n", getSaveDataSizeStr(mNacp.getCacheStorageSize().size).c_str()); printf(" JournalSize: %s\n", getSaveDataSizeStr(mNacp.getCacheStorageSize().journal_size).c_str()); printf(" MaxDataAndJournalSize: %s\n", getSaveDataSizeStr(mNacp.getCacheStorageDataAndJournalSizeMax()).c_str()); - printf(" StorageIndex: 0x%" PRIx16 "\n", mNacp.getCacheStorageIndex()); + printf(" StorageIndexMax: 0x%" PRIx16 "\n", mNacp.getCacheStorageIndexMax()); } printf(" Other Flags:\n"); printf(" StartupUserAccount: %s\n", getStartupUserAccountStr(mNacp.getStartupUserAccount()));