aboutsummaryrefslogtreecommitdiff
path: root/src/core/file_sys
AgeCommit message (Collapse)Author
2018-10-29savedata_factory: Expose accessors for SaveDataSpaceZach Hilman
2018-10-29control_metadata: Add GetRawBytes function to NACPZach Hilman
Returns the raw bytes of the NACP file. Needed for GetApplicationControlData which returns the raw, unprocessed NACP to the game.
2018-10-28file_sys/patch_manager: Remove unnecessary if-statements (#1586)Frederic L
* remove unnecessary if-statements * Addressed feedback
2018-10-26Merge pull request #1430 from DarkLordZach/remove-promote-dirbunnei
vfs: Remove InterpretAsDirectory and related functions
2018-10-25ips_layer: Use rle_size instead of data_size in RLE patch applicationZach Hilman
Prevents a potential bug when using RLE records in an IPS patch.
2018-10-24vfs: Handle failure of file reading within VfsRawCopy()Lioncash
Also gets rid of an unused variable.
2018-10-23Merge pull request #1515 from DarkLordZach/dlc-lfsbunnei
patch_manager: Add support for LayeredFS on DLC RomFS
2018-10-19vfs: Remove InterpretAsDirectory and related functionsZach Hilman
When writing VFS, it initally seemed useful to include a function to in-place convert container files into directories in one homogenous directory structure, but re-evaluating it now there have been plenty of chances to use it and there has always been a better way. Removing as it is unused and likely will not be used.
2018-10-18Merge pull request #1511 from lioncash/contentbunnei
content_archive: Minor reorganization changes
2018-10-18Merge pull request #1510 from lioncash/xcibunnei
XCI: Add function for checking the existence of the program NCA
2018-10-17qt: Add support for dumping a DLC Data RomFSZach Hilman
2018-10-17Merge pull request #1509 from DarkLordZach/device-save-databunnei
savedata_factory: Add DeviceSaveData and fix TemporaryStorage
2018-10-17registered_cache: Deduplicate results of ListEntry and ListEntryFilterZach Hilman
Prevents a Entry from appearing in the list twice if the user has it installed in two places (e.g. User NAND and SDMC)
2018-10-17patch_manager: Add support for using LayeredFS with DataZach Hilman
2018-10-16content_archive: Simpify assignment of bktr_base_romfs in the constructorLioncash
std::move doesn't actually dereference the data, so it doesn't matter whether or not the type is null.
2018-10-16content_archive: Make IsValidNCA() an internally linked functionLioncash
This is only ever used within the cpp file, so it can just be an internal function.
2018-10-16content_archive: Simplify rights ID checkLioncash
This is the same as using std::any_of with an inverted predicate.
2018-10-16content_archive: Split loading into separate functionsLioncash
The constructor alone is pretty large, the reading code should be split into its consistuent parts to make it easier to understand it without having to build a mental model of a 300+ line function.
2018-10-16content_archive: Pass and take NCASectionHeader instance by referenceLioncash
Each header is 512 bytes in size, which is kind of an excessive amount to copy all the time when it's possible to avoid doing so.
2018-10-16XCI: Add function for checking the existence of the program NCALioncash
The only reason the getter existed was to check whether or not the program NCA was null. Instead, we can just provide a function to query for the existence of it, instead of exposing it entirely.
2018-10-16Merge pull request #1443 from DarkLordZach/lower-loader-logs-1bunnei
content_archive/patch_manager: Lower log levels to eliminate some unnecessary logs
2018-10-16savedata_factory: Add TemporaryStorage SaveDataSpaceIdZach Hilman
Required for TemporaryStorage saves (in addition to SaveDataType)
2018-10-16savedata_factory: Add support for DeviceSaveDataZach Hilman
Uses the same path as SaveData except with UID 0. Adds a warning if UID is not 0.
2018-10-16file_sys/registered_cache: Use unique_ptr and regular pointers instead of ↵Lioncash
shared_ptrs where applicable The data retrieved in these cases are ultimately chiefly owned by either the RegisteredCache instance itself, or the filesystem factories. Both these should live throughout the use of their contained data. If they don't, it should be considered an interface/design issue, and using shared_ptr instances here would mask that, as the data would always be prolonged after the main owner's lifetime ended. This makes the lifetime of the data explicit and makes it harder to accidentally create cyclic references. It also makes the interface slightly more flexible than the previous API, as a shared_ptr can be created from a unique_ptr, but not the other way around, so this allows for that use-case if it ever becomes necessary in some form.
2018-10-15file_sys/control_metadata: Get rid of magic constantsLioncash
These are just the size of the data being passed in, so we can specify that via the size() member function.
2018-10-14aoc: Read DLC base title ID from RegisteredCacheZach Hilman
Falls back to title ID + 0x1000, which is what HOS does.
2018-10-12patch_manager: Move non-Program RomFS patch log to DebugZach Hilman
Normal Program-type patches will still be logged to aid in debugging, but for others (mainly Control), it was moved to Debug.
2018-10-12content_archive: Move get key log to Trace levelZach Hilman
Avoids printing live keys in the general log.
2018-10-12Merge pull request #1409 from DarkLordZach/key-derivationbunnei
crypto: Add support for full key derivation
2018-10-09Merge pull request #1461 from lioncash/warnbunnei
ips_layer: Silence truncation and conversion warnings
2018-10-09Merge pull request #1464 from lioncash/uniquebunnei
patch_manager: Return a std::unique_ptr from ParseControlNCA() and GetControlMetadata() instead of a std::shared_ptr
2018-10-09patch_manager: Return a std::unique_ptr from ParseControlNCA() and ↵Lioncash
GetControlMetadata() instead of a std::shared_ptr Neither of these functions require the use of shared ownership of the returned pointer. This makes it more difficult to create reference cycles with, and makes the interface more generic, as std::shared_ptr instances can be created from a std::unique_ptr, but the vice-versa isn't possible. This also alters relevant functions to take NCA arguments by const reference rather than a const reference to a std::shared_ptr. These functions don't alter the ownership of the memory used by the NCA instance, so we can make the interface more generic by not assuming anything about the type of smart pointer the NCA is contained within and make it the caller's responsibility to ensure the supplied NCA is valid.
2018-10-09ips_layer: Avoid constructing std::vector instances where not necessaryLioncash
We can just compare the existing std::vector instance with a constexpr std::array containing the desired match. This is lighter resource-wise, as we don't need to allocate on the heap.
2018-10-09ips_layer: Remove unnecessary explicit std::pair constructor in std::arrayLioncash
Makes the layout of the array consistent, by making all elements match, instead of special-casing the first one.
2018-10-09ips_layer: Add missing includesLioncash
Adds missing includes to prevent potential compilation issues in the future. Also moves the definition of a struct into the cpp file, so that some includes don't need to be introduced within the header.
2018-10-09ips_layer: std::move data within PatchIPS() and Apply()Lioncash
We don't need to make a copy of the read data, so we can std::move it into the make_shared call here.
2018-10-09ips_layer: Silence truncation and conversion warningsLioncash
Makes type conversions explicit to avoid compiler warnings.
2018-10-08Merge pull request #1423 from DarkLordZach/romfs-file-extsbunnei
fsmitm_romfsbuild: Add support for stubbing and IPS patches in LFS
2018-10-08Merge pull request #1424 from DarkLordZach/ips-witchbunnei
ips_layer: Add support for IPSwitch executable patches
2018-10-07vfs: Move forward declarations to separate fileZach Hilman
2018-10-05romfs_factory: Extract packed update setter to new functionZach Hilman
2018-10-05patch_manager: Add support for NSP packed updatesZach Hilman
Reads as Update (NSP) in add-ons
2018-10-05patch_manager: Add support for packed updatesZach Hilman
Will prefer any installed update over the packed version.
2018-10-04patch_manager: Avoid romfs_ext requirement for patchingZach Hilman
2018-10-04fsmitm_romfsbuild: Extract stubs and IPS to romfs_ext dirZach Hilman
2018-10-04fsmitm_romfsbuild: Add support for stubbing and IPS patches in LFSZach Hilman
2018-10-04ips_layer: Fix inaccuracies with comments and flagsZach Hilman
Specifically bugs/crashes that arise when putting them in positions that are legal but not typical, such as midline, between patch data, or between patch records.
2018-10-04ips_layer: Deduplicate resource usageZach Hilman
2018-10-04ips_layer: Add support for escape sequences and midline commentsZach Hilman
More accurately follows IPSwitch specification.
2018-10-04patch_manager: Add support for IPSwitch format patchesZach Hilman