| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
| |
Also removes some deprecated API usages.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* common: fs: fs_types: Create filesystem types
Contains various filesystem types used by the Common::FS library
* common: fs: fs_util: Add std::string to std::u8string conversion utility
* common: fs: path_util: Add utlity functions for paths
Contains various utility functions for getting or manipulating filesystem paths used by the Common::FS library
* common: fs: file: Rewrite the IOFile implementation
* common: fs: Reimplement Common::FS library using std::filesystem
* common: fs: fs_paths: Add fs_paths to replace common_paths
* common: fs: path_util: Add the rest of the path functions
* common: Remove the previous Common::FS implementation
* general: Remove unused fs includes
* string_util: Remove unused function and include
* nvidia_flags: Migrate to the new Common::FS library
* settings: Migrate to the new Common::FS library
* logging: backend: Migrate to the new Common::FS library
* core: Migrate to the new Common::FS library
* perf_stats: Migrate to the new Common::FS library
* reporter: Migrate to the new Common::FS library
* telemetry_session: Migrate to the new Common::FS library
* key_manager: Migrate to the new Common::FS library
* bis_factory: Migrate to the new Common::FS library
* registered_cache: Migrate to the new Common::FS library
* xts_archive: Migrate to the new Common::FS library
* service: acc: Migrate to the new Common::FS library
* applets/profile: Migrate to the new Common::FS library
* applets/web: Migrate to the new Common::FS library
* service: filesystem: Migrate to the new Common::FS library
* loader: Migrate to the new Common::FS library
* gl_shader_disk_cache: Migrate to the new Common::FS library
* nsight_aftermath_tracker: Migrate to the new Common::FS library
* vulkan_library: Migrate to the new Common::FS library
* configure_debug: Migrate to the new Common::FS library
* game_list_worker: Migrate to the new Common::FS library
* config: Migrate to the new Common::FS library
* configure_filesystem: Migrate to the new Common::FS library
* configure_per_game_addons: Migrate to the new Common::FS library
* configure_profile_manager: Migrate to the new Common::FS library
* configure_ui: Migrate to the new Common::FS library
* input_profiles: Migrate to the new Common::FS library
* yuzu_cmd: config: Migrate to the new Common::FS library
* yuzu_cmd: Migrate to the new Common::FS library
* vfs_real: Migrate to the new Common::FS library
* vfs: Migrate to the new Common::FS library
* vfs_libzip: Migrate to the new Common::FS library
* service: bcat: Migrate to the new Common::FS library
* yuzu: main: Migrate to the new Common::FS library
* vfs_real: Delete the contents of an existing file in CreateFile
Current usages of CreateFile expect to delete the contents of an existing file, retain this behavior for now.
* input_profiles: Don't iterate the input profile dir if it does not exist
Silences an error produced in the log if the directory does not exist.
* game_list_worker: Skip parsing file if the returned VfsFile is nullptr
Prevents crashes in GetLoader when the virtual file is nullptr
* common: fs: Validate paths for path length
* service: filesystem: Open the mod load directory as read only
|
|
|
|
|
|
| |
Now that we have most of core free of shadowing, we can enable the
warning as an error to catch anything that may be remaining and also
eliminate this class of logic bug entirely.
|
|
|
|
|
| |
Allows us to simplify the interface quite a bit as it will handle
contiguous sequences for us.
|
|
|
|
| |
- Removes a dependency on core and input_common from common.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Recent changes to the build system that made more warnings be flagged as
errors caused building via clang to break.
Fixes #4795
|
|
|
|
|
|
|
|
|
| |
Makes our error coverage a little more consistent across the board by
applying it to Linux side of things as well. This also makes it more
consistent with the warning settings in other libraries in the project.
This also updates httplib to 0.7.9, as there are several warning
cleanups made that allow us to enable several warnings as errors.
|
|
|
|
|
| |
We can supply the content provider as an argument instead of hardcoding
a global accessor in the implementation.
|
|\
| |
| | |
file_sys: Replace inclusions with forward declarations where applicable
|
| |
| |
| |
| | |
Same behavior, minus unnecessary inclusions where not necessary.
|
|/
|
|
|
| |
We can convert these maps into constexpr arrays to eliminate some
runtime static constructors.
|
|\
| |
| | |
common/fileutil: Convert namespace to Common::FS
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|\ \
| |/
|/| |
aes_util: Make use of non-template variant of Transcode
|
| |
| |
| |
| |
| | |
We can use sizeof to make it obvious at the call site where the value is
coming from.
|
| |
| |
| |
| | |
Same behavior, less template instantiations.
|
|\ \
| |/
|/| |
partition_data_manager: Make data arrays constexpr
|
| |
| |
| |
| | |
Fills in some hashes that were previously unhandled.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously the constructor for all of these would run at program
startup, consuming time before the application can enter main().
This is also particularly dangerous, given the logging system wouldn't
have been initialized properly yet, yet the program would use the logs
to signify an error.
To rectify this, we can replace the literals with constexpr functions
that perform the conversion at compile-time, completely eliminating the
runtime cost of initializing these arrays.
|
|/
|
|
|
|
| |
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.
|
|
|
|
| |
If the keys are zero, don't write them to the autogenerated file.
|
|
|
|
| |
Our codebase uppercases member function names.
|
|
|
|
| |
Prevents the singleton from being moved from.
|
|
|
|
|
|
|
| |
operator= typically returns a reference, it's not void.
While we're at it, we can correct the parameter formatting to adhere to the
codebase.
|
|
|
|
|
|
| |
Previously, we were reading the keys everytime a KeyManager object was created, causing yuzu to reread the keys file multiple hundreds of times when loading the game list.
With this change, it is only loaded once.
On my system, this decreased game list loading times by a factor of 20.
|
|\
| |
| | |
CMakeLists: Enable -Wmissing-declarations on Linux builds
|
| | |
|
|/ |
|
|\
| |
| | |
core: Make most implicit type conversion warnings errors on MSVC
|
| |
| |
| |
| |
| |
| |
| | |
Since the introduction of this library, numerous improvements have been
made. Notably, many of the warnings we would get by simply including the
library header have now been fixed. This makes it much easier to make
conversion warning an error.
|
| | |
|
|\ \
| | |
| | | |
core: Migrate off deprecated mbedtls functions
|
| |/
| |
| |
| |
| | |
These functions are marked for deprecation and it's recommended that the
*_ret variants be used instead.
|
|/
|
|
|
|
|
|
|
| |
This properly handles unicode-based paths on Windows, while opening a
raw stream doesn't out-of-the-box.
Prevents file creation from potentially failing on Windows PCs that make
use of unicode characters in their save paths (e.g. writing to a user's
AppData folder, where the user has a name with non-ASCII characters).
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| | |
loader, file_sys: Add support for parsing and loading KIP (Kernel Internal Process) files
|
| |
| |
| |
| | |
Previously, this TU contained the necessary headers to parse KIP/INI but now it should just use the FileSys class.
|
|/
|
|
|
|
| |
These can be generified together by using a concept type to designate
them. This also has the benefit of not making copies of potentially very
large arrays.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fixes Unicode Key File Directories
Adds code so that when loading a file it converts to UTF16 first, to
ensure the files can be opened. Code borrowed from FileUtil::Exists.
* Update src/core/crypto/key_manager.cpp
Co-Authored-By: Jungorend <Jungorend@users.noreply.github.com>
* Update src/core/crypto/key_manager.cpp
Co-Authored-By: Jungorend <Jungorend@users.noreply.github.com>
* Using FileUtil instead to be cleaner.
* Update src/core/crypto/key_manager.cpp
Co-Authored-By: Jungorend <Jungorend@users.noreply.github.com>
|
|\
| |
| | |
crypto/key_manager: Remove unused variable in GetTicketblob()
|
| | |
|
|/
|
|
|
|
|
|
|
| |
We can just return a new instance of this when it's requested. This only
ever holds pointers to the existing registed caches, so it's not a large
object. Plus, this also gets rid of the need to keep around a separate
member function just to properly clear out the union.
Gets rid of one of five globals in the filesystem code.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
| |
Crypto revisions are hex numbers and this function only checks if the string is valid for stoul in base 16, so it should be isxdigit.
|
| |
|
|
|
|
| |
Fixes a fatal crash on start when deriving keys.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We can just reserve the memory then perform successive insertions
instead of needing to use memcpy. This also avoids the need to zero out
the output vector's memory before performing the insertions.
We can also std::move the output std::vector into the destination so
that we don't need to make a completely new copy of the vector, getting
rid of an unnecessary allocation.
Additionally, we can use iterators to determine the beginning and end
ranges of the std::vector instances that comprise the output vector, as
the end of one range just becomes the beginning for the next successive
range, and since std::vector's iterator constructor copies data within
the range [begin, end), this is more straightforward and gets rid of the
need to have an offset variable that keeps getting incremented to
determine where to do the next std::memcpy.
|
|
|
|
|
| |
Aside from emplacing elements into the map, the map itself is never
actually queried for contained data.
|
|
|
|
|
| |
These are only ever read from, so we don't need to make a copy of all
the keys here.
|
|
|
|
|
|
| |
Given it's only used in one spot and has a fairly generic name, we can
just specify it directly in the function call. This also the benefit of
automatically moving it.
|
|
|
|
|
| |
Commented out code shouldn't be left in without a reason indicating why
in a comment.
|
| |
|
|
|
|
|
|
| |
Instead, we can make it part of the type and make named variables for
them, so they only require one definition (and if they ever change for
whatever reason, they only need to be changed in one spot).
|
|
|
|
|
|
| |
Given the VirtualFile instance isn't stored into the class as a data
member, or written to, this can just be turned into a const reference,
as the constructor doesn't need to make a copy of it.
|
|
|
|
|
| |
Orders the members in the exact order they would be initialized. This
also prevents compiler warnings about this sort of thing.
|
|
|
|
|
| |
Gets unused includes out of the headers and moves them into the cpp file
if they're used there instead.
|
|
|
|
|
|
| |
If the data is unconditionally being appended to the back of a
std::vector, we can just directly insert it there without the need to
insert all of the elements one-by-one with a std::back_inserter.
|
|
|
|
|
| |
If a conditional (or it's body) travels more than one line, it should be
braced.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Given the filesystem should always be assumed to be volatile, we should
check and bail out if a seek operation isn't successful. This'll prevent
potentially writing/returning garbage data from the function in rare
cases.
This also allows removing a check to see if an offset is within the
bounds of a file before perfoming a seek operation. If a seek is
attempted beyond the end of a file, it will fail, so this essentially
combines two checks into one in one place.
|
|
|
|
|
|
| |
Given the file is opened a few lines above and no operations are done,
other than check if the file is in a valid state, the read/write pointer
will always be at the beginning of the file.
|
|
|
|
| |
x
|
|
|
|
| |
Keeps track of system files for key derivation
|
| |
|
|
|
|
| |
Derives titlekeys
|
|
|
|
| |
Derives master keys, game encryption keys, and package1/2 keys
|
| |
|
|
|
|
| |
TSEC, SBK, BIS, and other Sources for proper derivation
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Reduces code
|
|
|
|
| |
Issues with block size are fixed by making all reads minimum length of 0x10
|
| |
|
|
|
|
| |
Eliminated duplicate code and adds support for Rev1+ carts
|
| |
|
|
|
|
|
| |
Cuts down on include dependencies, resulting in less files that need to
be rebuilt when certain things are changed.
|
| |
|
| |
|
|
|
|
| |
On call to WriteKeyToFile, so that the autogenerated file can be written.
|
| |
|
| |
|
|
|
|
| |
Stored in a separate file than manual keys.
|
| |
|
|
|
|
| |
Should make key gets marginally faster.
|
| |
|
|
|
|
| |
XTS with Nintendo Tweak will fail mysteriously if the sector size is not 0x4000. Upgrade the critical log to an assert to prevent undefined behavior.
|
|
|
|
| |
Fixes a bug where data lengths of less than size 0x10 will fail or have misleading return values.
|
|
|
|
|
| |
It's in the common code, so it should be under the Common namespace like
everything else.
|
|
|
|
| |
Move to hex_util.h in common
|
|
|
|
| |
These functions should only be given trivially-copyable types.
|
|
|
|
|
| |
This function doesn't directly depend on class state, so it can be
hidden entirely from the interface in the cpp file.
|
|
|
|
| |
This doesn't modify member state, so it can be made const.
|
| |
|
|
|
|
|
|
|
| |
The benefit of std::string_view comes from the idea of avoiding copies
(essentially acting as a non-owning view), however if we're just going
to copy into a local variable immediately, there's not much benefit
gained here.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|