aboutsummaryrefslogtreecommitdiff
path: root/src/core/file_sys
Commit message (Collapse)AuthorAgeFilesLines
* file_sys/errors: Remove currently unused filesystem error codesLioncash2018-11-161-10/+0
| | | | | Rather than keeping around unused values, we can just introduce them as needed.
* file_sys/errors: Get rid of the ErrCodes namespaceLioncash2018-11-161-17/+5
| | | | | | There's no real point to keeping the separate enum around, especially given the name of the error code itself is supposed to document what the value actually represents.
* file_sys/errors: Extract FS-related error codes to file_sys/errors.hLioncash2018-11-161-1/+8
| | | | Keeps filesystem-related error codes in one spot.
* Merge pull request #1618 from DarkLordZach/dump-nsobunnei2018-11-153-2/+24
|\ | | | | patch_manager: Add support for dumping uncompressed NSOs
| * patch_manager: Add support for dumping decompressed NSOsZach Hilman2018-10-291-0/+13
| | | | | | | | When enabled in settings, PatchNSO will dump the unmodified NSO that it was passed to a file named <build id>.nso in the dump root for the current title ID.
| * bis_factory: Add getter for mod dump root for a title IDZach Hilman2018-10-292-2/+11
| | | | | | | | Equates to yuzu_dir/dump/<title id>/
* | Merge pull request #1608 from DarkLordZach/save-data-readerbunnei2018-11-134-14/+28
|\ \ | | | | | | [ns|fsp_srv]: Implement various functions to boot Checkpoint
| * | ns: Implement command 400: GetApplicationControlDataZach Hilman2018-10-292-2/+2
| | | | | | | | | Returns the raw NACP bytes and the raw icon bytes into a title-provided buffer. Pulls from Registration Cache for control data, returning all zeros should it not exist.
| * | savedata_factory: Expose accessors for SaveDataSpaceZach Hilman2018-10-292-14/+21
| | |
| * | control_metadata: Add GetRawBytes function to NACPZach Hilman2018-10-292-0/+7
| |/ | | | | | | Returns the raw bytes of the NACP file. Needed for GetApplicationControlData which returns the raw, unprocessed NACP to the game.
* | general: Remove unused boost inclusions where applicableLioncash2018-10-301-1/+0
| | | | | | | | Cleans up unused includes and trims off some dependencies on externals.
* | global: Use std::optional instead of boost::optional (#1578)Frederic L2018-10-3011-84/+76
|/ | | | | | | | | | | | | | | | * get rid of boost::optional * Remove optional references * Use std::reference_wrapper for optional references * Fix clang format * Fix clang format part 2 * Adressed feedback * Fix clang format and MacOS build
* file_sys/patch_manager: Remove unnecessary if-statements (#1586)Frederic L2018-10-281-7/+6
| | | | | | * remove unnecessary if-statements * Addressed feedback
* Merge pull request #1430 from DarkLordZach/remove-promote-dirbunnei2018-10-2617-95/+1
|\ | | | | vfs: Remove InterpretAsDirectory and related functions
| * vfs: Remove InterpretAsDirectory and related functionsZach Hilman2018-10-1917-95/+1
| | | | | | | | 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.
* | ips_layer: Use rle_size instead of data_size in RLE patch applicationZach Hilman2018-10-251-1/+1
| | | | | | | | Prevents a potential bug when using RLE records in an IPS patch.
* | vfs: Handle failure of file reading within VfsRawCopy()Lioncash2018-10-241-2/+6
| | | | | | | | Also gets rid of an unused variable.
* | Merge pull request #1515 from DarkLordZach/dlc-lfsbunnei2018-10-233-4/+24
|\ \ | |/ |/| patch_manager: Add support for LayeredFS on DLC RomFS
| * qt: Add support for dumping a DLC Data RomFSZach Hilman2018-10-172-0/+5
| |
| * registered_cache: Deduplicate results of ListEntry and ListEntryFilterZach Hilman2018-10-172-2/+16
| | | | | | | | Prevents a Entry from appearing in the list twice if the user has it installed in two places (e.g. User NAND and SDMC)
| * patch_manager: Add support for using LayeredFS with DataZach Hilman2018-10-171-2/+3
| |
* | Merge pull request #1511 from lioncash/contentbunnei2018-10-182-258/+292
|\ \ | | | | | | content_archive: Minor reorganization changes
| * | content_archive: Simpify assignment of bktr_base_romfs in the constructorLioncash2018-10-161-2/+1
| | | | | | | | | | | | | | | std::move doesn't actually dereference the data, so it doesn't matter whether or not the type is null.
| * | content_archive: Make IsValidNCA() an internally linked functionLioncash2018-10-162-3/+1
| | | | | | | | | | | | | | | This is only ever used within the cpp file, so it can just be an internal function.
| * | content_archive: Simplify rights ID checkLioncash2018-10-161-2/+2
| | | | | | | | | | | | This is the same as using std::any_of with an inverted predicate.
| * | content_archive: Split loading into separate functionsLioncash2018-10-162-253/+290
| | | | | | | | | | | | | | | | | | 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.
| * | content_archive: Pass and take NCASectionHeader instance by referenceLioncash2018-10-162-3/+3
| |/ | | | | | | | | 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.
* | Merge pull request #1510 from lioncash/xcibunnei2018-10-182-5/+7
|\ \ | | | | | | XCI: Add function for checking the existence of the program NCA
| * | XCI: Add function for checking the existence of the program NCALioncash2018-10-162-5/+7
| |/ | | | | | | | | | | 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.
* | Merge pull request #1509 from DarkLordZach/device-save-databunnei2018-10-171-1/+12
|\ \ | |/ |/| savedata_factory: Add DeviceSaveData and fix TemporaryStorage
| * savedata_factory: Add TemporaryStorage SaveDataSpaceIdZach Hilman2018-10-161-1/+4
| | | | | | | | Required for TemporaryStorage saves (in addition to SaveDataType)
| * savedata_factory: Add support for DeviceSaveDataZach Hilman2018-10-161-0/+8
| | | | | | | | Uses the same path as SaveData except with UID 0. Adds a warning if UID is not 0.
* | Merge pull request #1443 from DarkLordZach/lower-loader-logs-1bunnei2018-10-162-3/+9
|\ \ | | | | | | content_archive/patch_manager: Lower log levels to eliminate some unnecessary logs
| * | patch_manager: Move non-Program RomFS patch log to DebugZach Hilman2018-10-121-2/+8
| | | | | | | | | | | | Normal Program-type patches will still be logged to aid in debugging, but for others (mainly Control), it was moved to Debug.
| * | content_archive: Move get key log to Trace levelZach Hilman2018-10-121-1/+1
| | | | | | | | | | | | Avoids printing live keys in the general log.
* | | file_sys/registered_cache: Use unique_ptr and regular pointers instead of ↵Lioncash2018-10-167-30/+30
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | file_sys/control_metadata: Get rid of magic constantsLioncash2018-10-151-3/+6
| | | | | | | | | | These are just the size of the data being passed in, so we can specify that via the size() member function.
* | aoc: Read DLC base title ID from RegisteredCacheZach Hilman2018-10-142-0/+5
| | | | | | Falls back to title ID + 0x1000, which is what HOS does.
* | Merge pull request #1409 from DarkLordZach/key-derivationbunnei2018-10-122-9/+22
|\ \ | |/ |/| crypto: Add support for full key derivation
| * vfs: Move forward declarations to separate fileZach Hilman2018-10-072-9/+22
| |
* | Merge pull request #1461 from lioncash/warnbunnei2018-10-091-3/+3
|\ \ | | | | | | ips_layer: Silence truncation and conversion warnings
| * | ips_layer: Silence truncation and conversion warningsLioncash2018-10-091-3/+3
| | | | | | | | | | | | Makes type conversions explicit to avoid compiler warnings.
* | | Merge pull request #1464 from lioncash/uniquebunnei2018-10-092-11/+9
|\ \ \ | | | | | | | | patch_manager: Return a std::unique_ptr from ParseControlNCA() and GetControlMetadata() instead of a std::shared_ptr
| * | | patch_manager: Return a std::unique_ptr from ParseControlNCA() and ↵Lioncash2018-10-092-11/+9
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | ips_layer: Avoid constructing std::vector instances where not necessaryLioncash2018-10-091-6/+25
| | | | | | | | | | | | | | | | | | 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.
* | | ips_layer: Remove unnecessary explicit std::pair constructor in std::arrayLioncash2018-10-091-5/+13
| | | | | | | | | | | | | | | Makes the layout of the array consistent, by making all elements match, instead of special-casing the first one.
* | | ips_layer: Add missing includesLioncash2018-10-092-7/+17
| | | | | | | | | | | | | | | | | | 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.
* | | ips_layer: std::move data within PatchIPS() and Apply()Lioncash2018-10-091-2/+5
|/ / | | | | | | | | We don't need to make a copy of the read data, so we can std::move it into the make_shared call here.
* | Merge pull request #1423 from DarkLordZach/romfs-file-extsbunnei2018-10-085-10/+38
|\ \ | | | | | | fsmitm_romfsbuild: Add support for stubbing and IPS patches in LFS
| * | patch_manager: Avoid romfs_ext requirement for patchingZach Hilman2018-10-041-4/+1
| | |