From 3952c73aee27d6d1401e0280c4f3432dd0ddecf5 Mon Sep 17 00:00:00 2001 From: Zach Hilman Date: Sun, 22 Sep 2019 21:50:29 -0400 Subject: card_image: Lazily load partitions in XCI --- src/core/file_sys/card_image.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/core/file_sys/card_image.h') diff --git a/src/core/file_sys/card_image.h b/src/core/file_sys/card_image.h index 3e6b92ff3..ea2ad7741 100644 --- a/src/core/file_sys/card_image.h +++ b/src/core/file_sys/card_image.h @@ -81,14 +81,17 @@ public: Loader::ResultStatus GetStatus() const; Loader::ResultStatus GetProgramNCAStatus() const; - u8 GetFormatVersion() const; + u8 GetFormatVersion(); + + VirtualDir GetPartition(XCIPartition partition); + std::vector GetPartitions(); - VirtualDir GetPartition(XCIPartition partition) const; std::shared_ptr GetSecurePartitionNSP() const; - VirtualDir GetSecurePartition() const; - VirtualDir GetNormalPartition() const; - VirtualDir GetUpdatePartition() const; - VirtualDir GetLogoPartition() const; + VirtualDir GetSecurePartition(); + VirtualDir GetNormalPartition(); + VirtualDir GetUpdatePartition(); + VirtualDir GetLogoPartition(); + u64 GetProgramTitleID() const; u32 GetSystemUpdateVersion(); @@ -123,6 +126,7 @@ private: Loader::ResultStatus program_nca_status; std::vector partitions; + std::vector partitions_raw; std::shared_ptr secure_partition; std::shared_ptr program; std::vector> ncas; -- cgit v1.2.3 From c4f3400bead6b666b803e3990a4aba625a2dfe70 Mon Sep 17 00:00:00 2001 From: Zach Hilman Date: Sun, 22 Sep 2019 21:51:46 -0400 Subject: card_image: Add accessors for raw partitions in XCI --- src/core/file_sys/card_image.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/core/file_sys/card_image.h') diff --git a/src/core/file_sys/card_image.h b/src/core/file_sys/card_image.h index ea2ad7741..c2ee0ea99 100644 --- a/src/core/file_sys/card_image.h +++ b/src/core/file_sys/card_image.h @@ -92,6 +92,13 @@ public: VirtualDir GetUpdatePartition(); VirtualDir GetLogoPartition(); + VirtualFile GetPartitionRaw(XCIPartition partition) const; + VirtualFile GetSecurePartitionRaw() const; + VirtualFile GetStoragePartition0() const; + VirtualFile GetStoragePartition1() const; + VirtualFile GetNormalPartitionRaw() const; + VirtualFile GetUpdatePartitionRaw() const; + VirtualFile GetLogoPartitionRaw() const; u64 GetProgramTitleID() const; u32 GetSystemUpdateVersion(); -- cgit v1.2.3