[Kernel] Improved TUs Support

- Changed name of config option to apply_title_update to better reflect what that option does
- Mount TU package to UPDATE: partition
- Simplified UserModule::title_id()
- Splitted loading module into two parts to allow applying TUs and custom patches
This commit is contained in:
Gliniak
2022-04-30 14:38:42 +02:00
parent 0fd578cafd
commit c65f240c0b
8 changed files with 132 additions and 59 deletions

View File

@@ -146,13 +146,15 @@ class ContentManager {
uint32_t title_id = -1);
std::unique_ptr<ContentPackage> ResolvePackage(
const std::string_view root_name, const XCONTENT_AGGREGATE_DATA& data);
const std::string_view root_name, const XCONTENT_AGGREGATE_DATA& data,
const uint32_t disc_number = -1);
bool ContentExists(const XCONTENT_AGGREGATE_DATA& data);
X_RESULT CreateContent(const std::string_view root_name,
const XCONTENT_AGGREGATE_DATA& data);
X_RESULT OpenContent(const std::string_view root_name,
const XCONTENT_AGGREGATE_DATA& data);
const XCONTENT_AGGREGATE_DATA& data,
const uint32_t disc_number = -1);
X_RESULT CloseContent(const std::string_view root_name);
X_RESULT GetContentThumbnail(const XCONTENT_AGGREGATE_DATA& data,
std::vector<uint8_t>* buffer);
@@ -166,7 +168,8 @@ class ContentManager {
private:
std::filesystem::path ResolvePackageRoot(XContentType content_type,
uint32_t title_id = -1);
std::filesystem::path ResolvePackagePath(const XCONTENT_AGGREGATE_DATA& data);
std::filesystem::path ResolvePackagePath(const XCONTENT_AGGREGATE_DATA& data,
const uint32_t disc_number = -1);
KernelState* kernel_state_;
std::filesystem::path root_path_;