aboutsummaryrefslogtreecommitdiff
path: root/src/core/file_sys
AgeCommit message (Collapse)Author
2020-09-14patch_manager: Make use of type aliasesLioncash
We can use these to avoid typing the same type redundantly. This way, if these ever change, only a single location needs to be modified.
2020-09-14patch_manager: Make a few functions internally linkedLioncash
These functions are only used within this translation unit, so we can make them internally linked.
2020-09-03file_sys/patch_manager: Add missing includeReinUsesLisp
Fixes build issues
2020-09-02Merge pull request #4564 from lioncash/file-includebunnei
file_sys: Replace inclusions with forward declarations where applicable
2020-08-25Merge pull request #4563 from lioncash/rcachebunnei
registered_cache: Make use of designated initializers
2020-08-23file_sys: Replace inclusions with forward declarations where applicableLioncash
Same behavior, minus unnecessary inclusions where not necessary.
2020-08-23registered_cache: Make use of ends_with for string suffix checkingLioncash
Simplifies code.
2020-08-23registered_cache: Make use of designated initializersLioncash
Removes the need for comments to indicate the fields being assigned.
2020-08-18vfs_real: Resolve sign conversion warningsLioncash
2020-08-18vfs_real: Avoid redundant map lookupsLioncash
Avoids some trivially avoidable map lookups by keeping the result of find operations around and querying them.
2020-08-16common/fileutil: Convert namespace to Common::FSLioncash
Migrates a remaining common file over to the Common namespace, making it consistent with the rest of common files. This also allows for high-traffic FS related code to alias the filesystem function namespace as namespace FS = Common::FS; for more concise typing.
2020-08-13General: Tidy up clang-format warnings part 2Lioncash
2020-08-09Merge pull request #4488 from lioncash/filebunnei
vfs_vector: Make creation of array vfs files less verbose
2020-08-05Merge pull request #4484 from lioncash/aesutilbunnei
aes_util: Allow SetIV() to be non-allocating
2020-08-05vfs_vector: Make creation of array vfs files less verboseLioncash
We can add a helper function to make creation of these files nicer. While we're at it, we can eliminate an unnecessary std::array copy in the constructor. This makes the overhead on some of these functions way less intensive, given some arrays were quite large. e.g. The timezone location names are 9633 bytes in size.
2020-08-04Merge pull request #4476 from lioncash/tzbunnei
time_zone_binary: Make use of designated initializers
2020-08-04Merge pull request #4470 from lioncash/qualifierDavid
patch_manager: Resolve -Wignored-qualifier warnings
2020-08-03Merge pull request #4456 from Morph1984/stub-really-long-fs-funcbunnei
fsp-srv: Stub Read/WriteSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute
2020-08-03aes_util: Allow SetIV to be non-allocatingLioncash
In a few places, the data to be set as the IV is already within an array. We shouldn't require this data to be heap-allocated if it doesn't need to be. This allows certain callers to reduce heap churn.
2020-08-03Merge pull request #4468 from lioncash/regcachebunnei
registered_cache: Resolve -Wmaybe_uninitialized warnings
2020-08-03Merge pull request #4467 from lioncash/modebunnei
file_sys/mode: Make use of DECLARE_ENUM_FLAG_OPERATORS with Mode
2020-08-03time_zone_binary: Make use of designated initializersLioncash
2020-08-03file_sys/mode: Make use of DECLARE_ENUM_FLAG_OPERATORS with ModeLioncash
Same behavior, minus a hand-rolled operator.
2020-08-03patch_manager: Resolve -Wignored-qualifier warningsLioncash
Top level const will always be ignored in this case, so it can be removed.
2020-08-03registered_cache: Resolve -Wmaybe_uninitialized warningsLioncash
While we're at it, we can avoid a redundant map lookup.
2020-07-30fs: Rename SaveDataDescriptor to SaveDataAttributeMorph
2020-07-29xts_archive: Check if the file is nullptr prior to parsingMorph
Fixes an access violation where the file no longer exists at the specified path while being parsed.
2020-07-29registered_cache: Add support for removing folder ncasMorph
2020-07-18file_sys/nsp: Make SetTicketKeys actually do somethingFearlessTobi
Previously, the method wasn't modifying any class state and therefore not having any effects when called. Since this has been the case for a very long time now, I'm not sure if we couldn't just remove this method altogether.
2020-07-17Merge pull request #4309 from Morph1984/fix-romfs-bugbunnei
fs: Fix RomFS building when zero byte files are present
2020-07-16Check for empty section0 and CNMT prior to installMorph
2020-07-15clang formatMorph
2020-07-15Use proper install result when overwriting filesMorph
2020-07-15Remove global system instance and address feedbackMorph
2020-07-15registered_cache: Remove previous update/dlc if it exists on installMorph
- This checks for and removes old updates or dlc based on title id. If a content meta nca exists within the registered cache, it will attempt to remove all the ncas associated with the content meta before installing a new update/dlc
2020-07-14Merge pull request #4282 from Morph1984/fs-sizebunnei
filesystem: Set various NAND partition sizes to their defaults
2020-07-12fs: Fix RomFS building when zero byte files are presentMorph
When zero byte files are present, the key (offset) for that file is identical to the file right after. A std::map isn't able to fit key-value pairs with identical keys (offsets), therefore, the solution is to use std::multimap which permits multiple entries with the same key. This most prominently fixes Pokemon Sword and Shield weather with any RomFS mod applied.
2020-07-10vfs_real: Fix MoveFileMorph
The file wasn't closed prior to being renamed / moved, throwing an error that states "The process cannot access the file because it is being used by another process." Fix this by closing the file prior to a rename / move operation. Fixes saving in Luigi's Mansion 3 and KATANA KAMI: A Way of the Samurai Story.
2020-07-10bis_factory: Set User NAND free space to be 1 MiB less than total.Morph
2020-07-10sdmc_factory: Set the SDMC total size to 1 TiBMorph
We should not be limited by the SDMC's partition size, set this to 1 TiB. Hardware is limited to the max allowed by the MBR partition table which is 2 TiB.
2020-07-10bis_factory: Use hardware default NAND partition sizesMorph
Sets the total space of user and system partitions to their hardware defaults. Furthermore, return the total space as free space for the user partition to prevent it from reaching zero. Some games like Bioshock 2 check for the available free space prior to save creation, and we should not be limited by arbitrary limits.
2020-07-01key_manager: Correct casing of instance()Lioncash
Our codebase uppercases member function names.
2020-07-01Merge pull request #3967 from FearlessTobi/keys-singletonDavid
crypto: Make KeyManager a singleton class
2020-06-19Merge pull request #4099 from MerryMage/macOS-buildbunnei
Fix compilation on macOS
2020-06-19mii_model: Remove redundant std::moveMerryMage
Named return value optimization automatically applies here.
2020-06-18shared_font: Service::NS::EncryptSharedFont takes a size_t&MerryMage
2020-05-28Make copying directory string more conciselat9nq
2020-05-28Address requested changeslat9nq
2020-05-27*nix systems can read any-case patch directorieslat9nq
Changes many patch_manager functions to use a case-less variant of GetSubdirectory. Fixes patches not showing up on *nix systems when patch directories are named with odd cases, i.e. `exeFS'.
2020-05-20Merge pull request #3946 from ogniK5377/sysverdat-10-0-2bunnei
file_sys: Update SystemVersion archive to version 10.0.2