Commit graph

599 commits

Author SHA1 Message Date
Lioncash
935346a9b2 romfs_factory: Remove unnecessary includes and use forward declarations where applicable
Avoids the need to rebuild whatever includes the romfs factory header if
the loader header ever changes. We also don't need to include the main
core header. We can instead include the headers we specifically need.
2018-08-20 20:27:00 -04:00
Zach Hilman
132d82db7d registration: Add Data_Unknown5 NCAContentType 2018-08-20 17:34:18 -04:00
Zach Hilman
350941e45e filesystem: Add support for loading of system archives 2018-08-18 21:28:23 -04:00
Lioncash
890507ecf1 common: Namespace hex_util.h/.cpp
It's in the common code, so it should be under the Common namespace like
everything else.
2018-08-15 23:24:00 -04:00
bunnei
960f4ecce2 Merge pull request #1005 from DarkLordZach/registered-fmt
file_sys: Add support for registration format
2018-08-15 23:11:58 -04:00
Lioncash
aaed702790 loader: Make ResultStatus directly compatible with fmt
We can make the enum class type compatible with fmt by providing an
overload of operator<<.

While we're at it, perform proper bounds checking. If something exceeds
the array, it should be a hard fail, because it's, without a doubt, a
programmer error in this case.
2018-08-15 05:52:37 -04:00
bunnei
34cba027e7 Merge pull request #1032 from lioncash/sanitize
vfs: Use sanitized paths within MoveFile() and MoveDirectory()
2018-08-13 01:43:35 -04:00
bunnei
faf3494968 Merge pull request #1031 from lioncash/verbosity
card_image: Simplify return statement of GetSubdirectories()
2018-08-13 01:42:07 -04:00
Lioncash
cdeac9103f vfs: Make VfsFilesystem constructor explicit
Makes it consistent with the other VFS interfaces and prevents implicit
construction.
2018-08-12 16:55:40 -04:00
Lioncash
80ac82c9c5 vfs: Make type hierarchy objects classes instead of structs
struct should be used when the data type is very simple or otherwise has
no invariants associated with it. Given these are used to form a
hierarchy, class should be used instead.
2018-08-12 16:55:40 -04:00
Zach Hilman
3781654c6d registration: Various style and documentation improvements
Fix logic in RealVfsFilesystem Create methods
Remove magic numbers
Fix regex errors
2018-08-12 15:55:44 -04:00
Lioncash
7803b153d8 vfs: Use sanitized paths within MoveFile() and MoveDirectory()
Previously these were being unused (or partially unused). While we're at
it, use better naming to make it visibly obvious which variant of the
path is being used.
2018-08-12 04:05:01 -04:00
Lioncash
91c673cac7 card_image: Use type aliases to shorten definitions
We have the aliases, so we may as well use 'em.
2018-08-12 03:57:16 -04:00
Lioncash
d323d72fd5 card_image: Simplify return statement of GetSubdirectories()
We don't need to write out the construction long-form, we can just let
the language itself work it out off the return type.
2018-08-12 03:53:20 -04:00
David Marcec
bba02ec641 made ResultStatus a u16 2018-08-12 14:56:22 +10:00
Zach Hilman
8c33f20792 registration: Add support for force overwrite of installed 2018-08-11 23:01:42 -04:00
Zach Hilman
fdb155ca09 vfs_real: Add CreateFullPath to Create* operations 2018-08-11 22:50:48 -04:00
Zach Hilman
b16c3dc725 control_metadata: Remove unnecessary reference to base file 2018-08-11 22:50:48 -04:00
Zach Hilman
0c55578a65 romfs: Remove cyclic shared_ptr leak in romfs code 2018-08-11 22:50:48 -04:00
Zach Hilman
83db3b452a registration: Update documentation and style 2018-08-11 22:50:48 -04:00
Zach Hilman
50ff8ec364 nca_metadata: Remove unnecessary reference to base file 2018-08-11 22:50:48 -04:00
Zach Hilman
2a0b80bb67 bis_factory: Create NAND dirs if they don't exist 2018-08-11 22:50:48 -04:00
Zach Hilman
f92fbf012d registration: Take RawCopy function as parameter
Instead of defaulting to VfsRawCopy
2018-08-11 22:50:48 -04:00
Zach Hilman
405d520d1d registered_cache: Fix missing reading from yuzu_meta 2018-08-11 22:50:48 -04:00
Zach Hilman
b0531d6ea0 file_sys: Comply to style guidelines 2018-08-11 22:50:48 -04:00
Zach Hilman
e9c7294bb9 qt: Add 'Install to NAND' option to menu
Prompts for title type on NCA files.
2018-08-11 22:50:48 -04:00
Zach Hilman
2d3617c723 file_sys: Add RegisteredCache
Manages NAND NCA get and install.
2018-08-11 22:50:48 -04:00
Zach Hilman
7fdfa63ce3 file_sys: Add support for parsing NCA metadata (CNMT) 2018-08-11 22:50:48 -04:00
Zach Hilman
f903b556d8 card_image: Add accessor for all NCAs in XCI 2018-08-11 22:50:48 -04:00
Zach Hilman
562e66e5d2 vfs_real: Add CreateFullPath to CreateFile
Fixes bugs with calling CreateFile when the immediate directory does not exist.
2018-08-11 22:50:48 -04:00
Zach Hilman
f60bb85805 bis_factory: Add partial implementation of BISFactory
Creates and stores RegisteredCaches for user and system NAND, as creation of a RegisteredCache is expensive.
2018-08-11 22:50:48 -04:00
Zach Hilman
b963629132 vfs: Add ConcatenatedVfsFile 2018-08-11 22:50:08 -04:00
Zach Hilman
da921ac3f3 loader: Add more descriptive errors
Full list of new errors and descriptions in core/loader/loader.h
2018-08-09 21:06:59 -04:00
bunnei
922cd52f4b Merge pull request #990 from lioncash/entry
fsp_srv: Emplace entries first when building index instead of emplacing last
2018-08-09 19:29:36 -04:00
Zach Hilman
e883f6faa8 vfs: Fix documentation 2018-08-08 21:45:04 -04:00
Zach Hilman
1e2232797a vfs: Fix typo in VfsFilesystem docs 2018-08-08 21:18:45 -04:00
Zach Hilman
b43d01f09b file_util: Use enum instead of bool for specifing path behavior 2018-08-08 21:18:45 -04:00
Zach Hilman
a92960a5d6 vfs: Use RealVfsFilesystem for fs-operations in RealVfsDirectory 2018-08-08 21:18:45 -04:00
Zach Hilman
d4ca68f3c5 file_sys: Add missing include in savedata_factory 2018-08-08 21:18:45 -04:00
Zach Hilman
4f44293e63 vfs: Add unreachable assert to file permissions converter 2018-08-08 21:18:45 -04:00
Zach Hilman
6b97b22716 vfs: Add RealVfsFilesystem implementation 2018-08-08 21:18:45 -04:00
Zach Hilman
325a55bb1e vfs: Add VfsFilesystem interface and default implementation 2018-08-08 21:18:45 -04:00
Lioncash
4cfe9fad75 fsp_srv: Use std::string_view's copy() function instead of strncpy()
Given elements inserted into a vector are zeroed out, we can just copy
MAX_LEN - 1 elements and the data will already be properly null
terminated.
2018-08-08 18:51:52 -04:00
bunnei
0eeda98acf Merge pull request #850 from DarkLordZach/icon-meta
Add Icons and Metadata Support
2018-08-08 12:27:19 -04:00
Zach Hilman
d53b3a13b3 loader: Add icon and title support to XCI 2018-08-06 23:13:42 -04:00
Zach Hilman
469f7cefe4 Use const where applicable 2018-08-06 23:06:33 -04:00
Zach Hilman
f89988272e Avoid parsing RomFS to directory in NCA 2018-08-06 23:06:33 -04:00
Zach Hilman
3150538b3f content_archive: Add support for titlekey cryptography 2018-08-04 14:57:21 -04:00
bunnei
4c42134b09 Merge pull request #849 from DarkLordZach/xci
XCI and Encrypted NCA Support
2018-08-04 14:33:11 -04:00
Lioncash
5b317d1b80 vfs_vector: Remove unused variable in FindAndRemoveVectorElement()
This wasn't being used for anything, so it can be removed.
2018-08-02 11:40:24 -04:00