Commit Graph

84 Commits

Author SHA1 Message Date
gibbed
cabd28b9bb [VFS] Fix handling of remove_all return value. 2020-11-24 02:02:49 -06:00
gibbed
bda31a443e [VFS] Avoid exception on remove/remove_all. 2020-11-24 00:23:38 -06:00
gibbed
cf0251cd9f [Kernel/VFS] Cleanup info query/set+sector size.
[VFS] Device now exposes name, attributes, component name max length.
[VFS] Fix STFS device to return 0x200 sector size. XCTD compression
      userland code appears to always expect a sector size of 0x200.
[Kernel] Move X_FILE_*_INFORMATION structs to new files.
[Kernel] Move NtQueryInformationFile, NtSetInformationFile,
         NtQueryVolumeInformationFile to new file.
[Kernel] Cleanup implementation of NtQueryInformationFile,
         NetSetInformationFile, NtQueryVolumeInformationFile.
[Kernel] Properly validate arguments to NtQueryInformationFile,
         NetSetInformationFile, NtQueryVolumeInformationFile.
[Kernel] Properly implement query of XFileFsVolumeInformation.
[Kernel] Properly implement query of XFileFsSizeInformation.
[Kernel] Properly implement query of XFileFsAttributeInformation.
2020-04-20 16:08:02 -05:00
gibbed
1c2d6753bb [Kernel/VFS] Specify root entry to open from + cleanup.
[VFS] Allow specifying root entry to open from with OpenFile.
[Kernel] NtCreateFile now opens from root entry when available instead
         of needlessly building a full path and resolving from that.
[VFS] Reduce code duplication by adding Entry::ResolvePath.
[VFS] Remove ResolveBasePath to avoid multiple calls to find_base_guest_path.
2020-04-20 01:14:07 -05:00
gibbed
0d010a2e3d [VFS] Fix data fragment path for multi-file STFS. 2020-04-09 11:33:08 -05:00
gibbed
ed04d96e67 Avoid using '#' format spec for X hex numbers.
Avoid using '#' format spec for X (uppercase) hex numbers, as it
results in output like "0XABCDEF" instead of "0xABCDEF".
2020-04-09 11:25:08 -05:00
Sandy Carter
e605eef781 filesystem: remove unused includes of header 2020-04-09 09:44:48 -05:00
Sandy Carter
fc5153bca1 filesystem: use std for DeleteFile
Remove custom platform implementation of `DeleteFile` and replace single
use with `std::filesystem::remove` after a negative
`std::filesystem::is_directory` check.
2020-04-09 09:44:48 -05:00
Sandy Carter
df65de231f filesystem: use std for DeleteFolder
Remove custom platform implementation of `DeleteFolder` and replace two
uses with `std::filesystem::remove_all` which removes a file or
directory with all its contents.
2020-04-09 09:44:48 -05:00
Sandy Carter
69bcf59c79 filesystem: use std for CreateFolder
Remove custom platform implementation of `CreateFolder` and replace uses
with `std::filesystem::create_directories` which creates paths
recursively.
2020-04-09 09:44:48 -05:00
Sandy Carter
c8e64da4eb filesystem: use std for PathExists
Remove custom platform implementation of `PathExists` and replace uses
with `std::filesystem::exists`.
2020-04-09 09:44:48 -05:00
Sandy Carter
a9fa38c88b filesystem: use std for IsFolder
Remove custom platform implementation of IsFolder and replace
single use with `std::filesystem::is_directory`.
2020-04-09 09:44:48 -05:00
gibbed
a48bb71c2f Overhaul logging. 2020-04-07 16:09:41 -05:00
gibbed
5bf0b34445 C++17ification.
C++17ification!

- Filesystem interaction now uses std::filesystem::path.
- Usage of const char*, std::string have been changed to
  std::string_view where appropriate.
- Usage of printf-style functions changed to use fmt.
2020-04-07 16:09:41 -05:00
Triang3l
e07b0ed2ad [VFS] Fix some security issues in StfsContainerDevice code 2019-10-22 08:55:45 +03:00
gibbed
3e6c2bb47c Fix up handling of positional options in cvar handling.
- Fix up handling of positional options in cvar handling so that executables
  other than app can handle them properly.
- Fix command-line arguments for xenia-vfs-dump.
2019-08-24 07:41:55 -05:00
emoose
f46e3c7e39 [Kernel/VFS] Ensure vfs::Entry is up-to-date before retrieving file information
Games like Forza use NtQueryInformationFile to get the size of the file, to make sure that there's enough room inside it to write data.

Previously, updating the file size (via SetInfoFile(EndOfFile) or WriteFile) wouldn't update the vfs::Entry size field, which NtQueryInfo uses to return the size of the file.

This resulted in the game thinking that the file was smaller than it actually is, and trying to correct that by using SetInfoFile(EndOfFile), which then truncated the file and deleted important data that was written to it.
2019-08-21 02:00:57 -05:00
Jonathan Goyvaerts
81fe22f1c8 Get rid of gflags alltogether 2019-08-03 02:34:19 +02:00
gibbed
05d2d76cff [VFS] Reimplement ResolvePath. Add FindSymbolicLink, ResolveSymbolicLink. 2019-07-29 17:55:46 -05:00
gibbed
e72cacc986 [VFS] Make ResolvePath argument a const reference. 2019-07-29 16:04:25 -05:00
gibbed
0d3039f5ba [VFS] Fix an outdated commit of OpenFile that somehow slipped through. 2019-07-18 17:49:15 -05:00
gibbed
324d28adba [VFS] Fix comment. 2019-07-18 17:24:44 -05:00
gibbed
bf989f0aae [Kernel/VFS] Maybe fix creation of directories. See #1403. 2019-07-18 17:15:57 -05:00
Rick Gibbed
9bb20bfc36 Merge pull request #1254 from Wildenhaus/master
Games on Demand / Multi-file STFS (SVOD) support.
2019-05-04 11:30:48 -05:00
gibbed
1145d57007 Undo main/wWinMain changes in preparation for new method
of doing a startup AVX check.

This reverts commit 4030cff3ec.
2019-04-20 02:32:45 -05:00
gibbed
4030cff3ec - Move main, wWinMain entrypoints to their own file.
- Fix startup AVX checks.
2019-04-18 16:57:42 -05:00
gibbed
ffbc99926b - Update premake build script for VS2017+ build support.
- Update premake (for VS2019 support).
- Update Xenia build script to detect VS2017+ version.
- Update Xenia premake scripts due to updated premake.
- Fix cc override in Xenia build script.
2019-04-18 09:28:31 -05:00
Wildenhaus
798e88224a Ordinal offset calculation for games with many files 2018-12-15 20:27:15 -05:00
Wildhaus
151a955c6a Support EGDF and XSF layouts 2018-11-28 10:08:07 -05:00
Margen67
896ac4a682 Update documentation.
- Convert http to https, provide archive link when possible.
- Made CPU-JIT.png more readable on dark themes;
Added a white background so there isn't black text on a black
background.
2018-11-22 09:20:09 -06:00
Wildhaus
80375c62e8 Add support for STFS Metadata V2 2018-11-11 15:27:34 -05:00
Wildhaus
19fb21da7d Games on Demand / Multifile STFS (SVOD) Support 2018-11-11 15:27:29 -05:00
Dr. Chat
f89b4626a3 [VFS] Add VFS dump tool (supporting STFS only as of now) 2018-06-26 13:45:16 -05:00
Dr. Chat
ef18e9d649 [VFS] Fix Stfs GetBlockHash (and simplify it) 2018-05-29 23:12:27 -05:00
Dr. Chat
a0464f54ba [VFS] SVOD (with EGDF) support 2018-05-29 14:12:09 -05:00
Dr. Chat
fed3c10c60 [VFS] Properly detect STFS volume descriptor type 2018-05-27 14:03:29 -05:00
Dr. Chat
3e216f0553 [VFS] Panic when fed a GoD container 2018-05-26 21:19:34 -05:00
Dr. Chat
728ed593ad [VFS] Make ResolvePath / Dump virtual 2018-05-26 18:51:03 -05:00
Dr. Chat
1def8cfc59 [VFS] Rename a couple STFSVolumeDescriptor fields 2018-05-26 09:06:10 -05:00
gibbed
85ad87eb73 [Kernel] Fix ContentPackage leaking its registered device. 2018-05-24 11:17:52 -05:00
gibbed
bc369e43cb [Kernel] Add support for XFileEndOfFileInformation. 2018-05-23 04:24:37 -05:00
Dr. Chat
5fde9fa720 Fix typo in xenia-vfs premake generator. Fixes #701. 2017-05-10 22:15:03 -05:00
Justin Moore
2070570307 Merge pull request #655 from inckie/bugfix_filetime
Make vfs::Entry time stamps consistent (as Windows FILETIME)
2017-02-23 16:58:01 -06:00
Ink
fe3d31067f * proper FAT timestamp handling 2017-02-23 19:38:29 +03:00
tgsm
3dc8065a57 vfs: fix dead link 2017-02-21 22:26:18 -05:00
tgsm
cd28fb9a0e vfs: fix typo in StfsContentType enum 2017-02-21 22:25:53 -05:00
Dr. Chat
b66f10f2b8 Testing travis xenia powerpc testing 2017-02-06 00:40:06 -06:00
gibbed
17529b063f Spliced out the FS wildcard stuff. 2017-01-19 17:06:35 -06:00
Ink
0d8a81137c * make vfs::Entry time stamps consistent (as Windows FILETIME) 2017-01-06 04:17:04 +03:00
Dr. Chat
e8719dd949 Fix an overflow crash in DiscImageDevice::Verify 2016-01-14 15:18:41 -06:00