fs: for my sanity, begin tracking version where code was last checked for accuracy

This commit is contained in:
Michael Scire 2022-03-24 08:43:40 -07:00
parent b69fa13576
commit 4646581e93
133 changed files with 195 additions and 66 deletions

View file

@ -20,6 +20,7 @@
namespace ams::fs { namespace ams::fs {
/* ACCURATE_TO_VERSION: Unknown */
class HierarchicalRomFileTable { class HierarchicalRomFileTable {
public: public:
using Position = u32; using Position = u32;

View file

@ -19,6 +19,7 @@
namespace ams::fs { namespace ams::fs {
/* ACCURATE_TO_VERSION: Unknown */
template<typename KeyType, typename ValueType, size_t MaxAuxiliarySize> template<typename KeyType, typename ValueType, size_t MaxAuxiliarySize>
class KeyValueRomStorageTemplate { class KeyValueRomStorageTemplate {
public: public:

View file

@ -18,6 +18,8 @@
namespace ams::fs::RomPathTool { namespace ams::fs::RomPathTool {
/* ACCURATE_TO_VERSION: Unknown */
constexpr inline u32 MaxPathLength = 0x300; constexpr inline u32 MaxPathLength = 0x300;
struct RomEntryName { struct RomEntryName {

View file

@ -18,6 +18,7 @@
namespace ams::fs { namespace ams::fs {
/* ACCURATE_TO_VERSION: Unknown */
using RomPathChar = char; using RomPathChar = char;
using RomFileId = s32; using RomFileId = s32;
using RomDirectoryId = s32; using RomDirectoryId = s32;

View file

@ -19,6 +19,7 @@
namespace ams::fs { namespace ams::fs {
/* ACCURATE_TO_VERSION: 13.4.0.0 */
class DirectoryPathParser { class DirectoryPathParser {
NON_COPYABLE(DirectoryPathParser); NON_COPYABLE(DirectoryPathParser);
NON_MOVEABLE(DirectoryPathParser); NON_MOVEABLE(DirectoryPathParser);

View file

@ -22,6 +22,7 @@
namespace ams::fs { namespace ams::fs {
/* ACCURATE_TO_VERSION: Unknown */
class FileStorage : public IStorage, public impl::Newable { class FileStorage : public IStorage, public impl::Newable {
NON_COPYABLE(FileStorage); NON_COPYABLE(FileStorage);
NON_MOVEABLE(FileStorage); NON_MOVEABLE(FileStorage);
@ -74,6 +75,7 @@ namespace ams::fs {
virtual Result OperateRange(void *dst, size_t dst_size, OperationId op_id, s64 offset, s64 size, const void *src, size_t src_size) override; virtual Result OperateRange(void *dst, size_t dst_size, OperationId op_id, s64 offset, s64 size, const void *src, size_t src_size) override;
}; };
/* ACCURATE_TO_VERSION: Unknown */
class FileStorageBasedFileSystem : public FileStorage { class FileStorageBasedFileSystem : public FileStorage {
NON_COPYABLE(FileStorageBasedFileSystem); NON_COPYABLE(FileStorageBasedFileSystem);
NON_MOVEABLE(FileStorageBasedFileSystem); NON_MOVEABLE(FileStorageBasedFileSystem);

View file

@ -18,6 +18,8 @@
namespace ams::fs { namespace ams::fs {
/* ACCURATE_TO_VERSION: Unknown */
enum AccessLogMode : u32 { enum AccessLogMode : u32 {
AccessLogMode_None = 0, AccessLogMode_None = 0,
AccessLogMode_Log = 1, AccessLogMode_Log = 1,

View file

@ -18,6 +18,8 @@
namespace ams::fs { namespace ams::fs {
/* ACCURATE_TO_VERSION: Unknown */
void InitializeForSystem(); void InitializeForSystem();
void InitializeWithMultiSessionForSystem(); void InitializeWithMultiSessionForSystem();

View file

@ -18,6 +18,8 @@
namespace ams::fs { namespace ams::fs {
/* ACCURATE_TO_VERSION: Unknown */
Result MountApplicationPackage(const char *name, const char *common_path); Result MountApplicationPackage(const char *name, const char *common_path);
} }

View file

@ -19,6 +19,8 @@
namespace ams::fs { namespace ams::fs {
/* ACCURATE_TO_VERSION: Unknown */
enum class BisPartitionId { enum class BisPartitionId {
/* Boot0 */ /* Boot0 */
BootPartition1Root = 0, BootPartition1Root = 0,

View file

@ -20,6 +20,7 @@
namespace ams::fs { namespace ams::fs {
/* ACCURATE_TO_VERSION: 13.4.0.0 */
Result MountCode(CodeVerificationData *out, const char *name, const char *path, ncm::ProgramId program_id); Result MountCode(CodeVerificationData *out, const char *name, const char *path, ncm::ProgramId program_id);
Result MountCodeForAtmosphereWithRedirection(CodeVerificationData *out, const char *name, const char *path, ncm::ProgramId program_id, bool is_hbl, bool is_specific); Result MountCodeForAtmosphereWithRedirection(CodeVerificationData *out, const char *name, const char *path, ncm::ProgramId program_id, bool is_hbl, bool is_specific);

View file

@ -19,6 +19,7 @@
namespace ams::fs { namespace ams::fs {
/* ACCURATE_TO_VERSION: 13.4.0.0 */
struct CodeVerificationData : public ams::sf::LargeData { struct CodeVerificationData : public ams::sf::LargeData {
u8 signature[crypto::Rsa2048PssSha256Verifier::SignatureSize]; u8 signature[crypto::Rsa2048PssSha256Verifier::SignatureSize];
u8 target_hash[crypto::Rsa2048PssSha256Verifier::HashSize]; u8 target_hash[crypto::Rsa2048PssSha256Verifier::HashSize];

View file

@ -21,6 +21,7 @@
namespace ams::fs { namespace ams::fs {
/* ACCURATE_TO_VERSION: Unknown */
struct Int64 { struct Int64 {
u32 low; u32 low;
u32 high; u32 high;

View file

@ -19,6 +19,7 @@
namespace ams::fs { namespace ams::fs {
/* ACCURATE_TO_VERSION: Unknown */
enum ContentType { enum ContentType {
ContentType_Meta = 0, ContentType_Meta = 0,
ContentType_Control = 1, ContentType_Control = 1,

View file

@ -18,6 +18,7 @@
namespace ams::fs { namespace ams::fs {
/* ACCURATE_TO_VERSION: Unknown */
enum class ContentStorageId : u32 { enum class ContentStorageId : u32 {
System = 0, System = 0,
User = 1, User = 1,

View file

@ -19,6 +19,7 @@
namespace ams::fs { namespace ams::fs {
/* ACCURATE_TO_VERSION: Unknown */
Result MountDeviceSaveData(const char *name); Result MountDeviceSaveData(const char *name);
Result MountDeviceSaveData(const char *name, const ncm::ApplicationId application_id); Result MountDeviceSaveData(const char *name, const ncm::ApplicationId application_id);

View file

@ -18,6 +18,7 @@
namespace ams::fs { namespace ams::fs {
/* ACCURATE_TO_VERSION: Unknown */
constexpr inline size_t EntryNameLengthMax = 0x300; constexpr inline size_t EntryNameLengthMax = 0x300;
struct DirectoryEntry { struct DirectoryEntry {

View file

@ -20,6 +20,7 @@
namespace ams::fs { namespace ams::fs {
/* ACCURATE_TO_VERSION: Unknown */
struct FileTimeStamp { struct FileTimeStamp {
time::PosixTime create; time::PosixTime create;
time::PosixTime modify; time::PosixTime modify;

View file

@ -18,6 +18,7 @@
namespace ams::fs { namespace ams::fs {
/* ACCURATE_TO_VERSION: Unknown */
enum class GameCardPartition { enum class GameCardPartition {
Update = 0, Update = 0,
Normal = 1, Normal = 1,

View file

@ -20,6 +20,7 @@
namespace ams::fs { namespace ams::fs {
/* ACCURATE_TO_VERSION: Unknown */
enum MountHostOptionFlag : u32 { enum MountHostOptionFlag : u32 {
MountHostOptionFlag_None = (0 << 0), MountHostOptionFlag_None = (0 << 0),
MountHostOptionFlag_PseudoCaseSensitive = (1 << 0), MountHostOptionFlag_PseudoCaseSensitive = (1 << 0),

View file

@ -18,6 +18,7 @@
namespace ams::fs { namespace ams::fs {
/* ACCURATE_TO_VERSION: Unknown */
class IEventNotifier { class IEventNotifier {
public: public:
virtual ~IEventNotifier() { /* ... */ } virtual ~IEventNotifier() { /* ... */ }

View file

@ -18,6 +18,7 @@
namespace ams::fs { namespace ams::fs {
/* ACCURATE_TO_VERSION: Unknown */
enum class ImageDirectoryId { enum class ImageDirectoryId {
Nand = 0, Nand = 0,
SdCard = 1, SdCard = 1,

View file

@ -20,6 +20,7 @@
namespace ams::fs { namespace ams::fs {
/* ACCURATE_TO_VERSION: Unknown */
class IStorage { class IStorage {
public: public:
virtual ~IStorage() { /* ... */ } virtual ~IStorage() { /* ... */ }

View file

@ -18,6 +18,7 @@
namespace ams::fs { namespace ams::fs {
/* ACCURATE_TO_VERSION: Unknown */
using AllocateFunction = void *(*)(size_t); using AllocateFunction = void *(*)(size_t);
using DeallocateFunction = void (*)(void *, size_t); using DeallocateFunction = void (*)(void *, size_t);

View file

@ -20,6 +20,7 @@
namespace ams::fs { namespace ams::fs {
/* ACCURATE_TO_VERSION: Unknown */
class MemoryStorage : public ::ams::fs::IStorage, public ::ams::fs::impl::Newable { class MemoryStorage : public ::ams::fs::IStorage, public ::ams::fs::impl::Newable {
private: private:
u8 * const m_buf; u8 * const m_buf;

View file

@ -18,6 +18,7 @@
namespace ams::fs { namespace ams::fs {
/* ACCURATE_TO_VERSION: Unknown */
constexpr inline size_t MountNameLengthMax = 15; constexpr inline size_t MountNameLengthMax = 15;
Result ConvertToFsCommonPath(char *dst, size_t dst_size, const char *src); Result ConvertToFsCommonPath(char *dst, size_t dst_size, const char *src);

View file

@ -18,6 +18,7 @@
namespace ams::fs { namespace ams::fs {
/* ACCURATE_TO_VERSION: Unknown */
enum class OperationId : s64 { enum class OperationId : s64 {
FillZero = 0, FillZero = 0,
DestroySignature = 1, DestroySignature = 1,

View file

@ -23,6 +23,7 @@ namespace ams::fs {
class DirectoryPathParser; class DirectoryPathParser;
/* ACCURATE_TO_VERSION: 13.4.0.0 */
class Path { class Path {
NON_COPYABLE(Path); NON_COPYABLE(Path);
NON_MOVEABLE(Path); NON_MOVEABLE(Path);

View file

@ -19,6 +19,7 @@
namespace ams::fs { namespace ams::fs {
/* ACCURATE_TO_VERSION: 13.4.0.0 */
namespace StringTraits { namespace StringTraits {
constexpr inline char DirectorySeparator = '/'; constexpr inline char DirectorySeparator = '/';

View file

@ -18,6 +18,7 @@
namespace ams::fs { namespace ams::fs {
/* ACCURATE_TO_VERSION: Unknown */
enum Priority { enum Priority {
Priority_Realtime = 0, Priority_Realtime = 0,
Priority_Normal = 1, Priority_Normal = 1,

View file

@ -19,6 +19,7 @@
namespace ams::fs { namespace ams::fs {
/* ACCURATE_TO_VERSION: Unknown */
struct ProgramIndexMapInfo { struct ProgramIndexMapInfo {
ncm::ProgramId program_id; ncm::ProgramId program_id;
ncm::ProgramId base_program_id; ncm::ProgramId base_program_id;

View file

@ -19,6 +19,7 @@
namespace ams::fs { namespace ams::fs {
/* ACCURATE_TO_VERSION: Unknown */
struct QueryRangeInfo { struct QueryRangeInfo {
s32 aes_ctr_key_type; s32 aes_ctr_key_type;
s32 speed_emulation_type; s32 speed_emulation_type;

View file

@ -22,6 +22,8 @@
namespace ams::fs { namespace ams::fs {
/* ACCURATE_TO_VERSION: Unknown */
namespace { namespace {
class ReadOnlyFile : public fsa::IFile, public impl::Newable { class ReadOnlyFile : public fsa::IFile, public impl::Newable {

View file

@ -18,6 +18,7 @@
namespace ams::fs { namespace ams::fs {
/* ACCURATE_TO_VERSION: Unknown */
void SetEnabledAutoAbort(bool enabled); void SetEnabledAutoAbort(bool enabled);
void SetResultHandledByApplication(bool application); void SetResultHandledByApplication(bool application);

View file

@ -18,6 +18,7 @@
namespace ams::fs { namespace ams::fs {
/* ACCURATE_TO_VERSION: Unknown */
union RightsId { union RightsId {
u8 data[0x10]; u8 data[0x10];
u64 data64[2]; u64 data64[2];

View file

@ -23,6 +23,7 @@
namespace ams::fs { namespace ams::fs {
/* ACCURATE_TO_VERSION: Unknown */
class RomFsFileSystem : public fsa::IFileSystem, public impl::Newable { class RomFsFileSystem : public fsa::IFileSystem, public impl::Newable {
NON_COPYABLE(RomFsFileSystem); NON_COPYABLE(RomFsFileSystem);
public: public:

View file

@ -19,6 +19,7 @@
namespace ams::fs { namespace ams::fs {
/* ACCURATE_TO_VERSION: Unknown */
Result DeleteSaveData(SaveDataId id); Result DeleteSaveData(SaveDataId id);
Result DeleteSaveData(SaveDataSpaceId space_id, SaveDataId id); Result DeleteSaveData(SaveDataSpaceId space_id, SaveDataId id);

View file

@ -19,6 +19,7 @@
namespace ams::fs { namespace ams::fs {
/* ACCURATE_TO_VERSION: Unknown */
Result CommitSaveData(const char *path); Result CommitSaveData(const char *path);
} }

View file

@ -18,6 +18,7 @@
namespace ams::fs { namespace ams::fs {
/* ACCURATE_TO_VERSION: Unknown */
using SaveDataId = u64; using SaveDataId = u64;
using SystemSaveDataId = u64; using SystemSaveDataId = u64;
using SystemBcatSaveDataId = SystemSaveDataId; using SystemBcatSaveDataId = SystemSaveDataId;

View file

@ -18,6 +18,7 @@
namespace ams::fs { namespace ams::fs {
/* ACCURATE_TO_VERSION: Unknown */
class IEventNotifier; class IEventNotifier;
struct EncryptionSeed { struct EncryptionSeed {

View file

@ -1,54 +0,0 @@
/*
* Copyright (c) Atmosphère-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include <stratosphere/fs/fs_common.hpp>
#include <stratosphere/fs/impl/fs_newable.hpp>
#include <stratosphere/fs/fsa/fs_ifile.hpp>
#include <stratosphere/fs/fsa/fs_idirectory.hpp>
#include <stratosphere/fs/fsa/fs_ifilesystem.hpp>
namespace ams::fs {
class SharedFileSystemHolder : public fsa::IFileSystem, public impl::Newable {
NON_COPYABLE(SharedFileSystemHolder);
NON_MOVEABLE(SharedFileSystemHolder);
private:
std::shared_ptr<fsa::IFileSystem> m_fs;
public:
SharedFileSystemHolder(std::shared_ptr<fsa::IFileSystem> f) : m_fs(std::move(f)) { /* ... */ }
public:
virtual Result DoCreateFile(const fs::Path &path, s64 size, int flags) override { return m_fs->CreateFile(path, size, flags); }
virtual Result DoDeleteFile(const fs::Path &path) override { return m_fs->DeleteFile(path); }
virtual Result DoCreateDirectory(const fs::Path &path) override { return m_fs->CreateDirectory(path); }
virtual Result DoDeleteDirectory(const fs::Path &path) override { return m_fs->DeleteDirectory(path); }
virtual Result DoDeleteDirectoryRecursively(const fs::Path &path) override { return m_fs->DeleteDirectoryRecursively(path); }
virtual Result DoRenameFile(const fs::Path &old_path, const fs::Path &new_path) override { return m_fs->RenameFile(old_path, new_path); }
virtual Result DoRenameDirectory(const fs::Path &old_path, const fs::Path &new_path) override { return m_fs->RenameDirectory(old_path, new_path); }
virtual Result DoGetEntryType(fs::DirectoryEntryType *out, const fs::Path &path) override { return m_fs->GetEntryType(out, path); }
virtual Result DoOpenFile(std::unique_ptr<fs::fsa::IFile> *out_file, const fs::Path &path, fs::OpenMode mode) override { return m_fs->OpenFile(out_file, path, mode); }
virtual Result DoOpenDirectory(std::unique_ptr<fs::fsa::IDirectory> *out_dir, const fs::Path &path, fs::OpenDirectoryMode mode) override { return m_fs->OpenDirectory(out_dir, path, mode); }
virtual Result DoCommit() override { return m_fs->Commit(); }
virtual Result DoGetFreeSpaceSize(s64 *out, const fs::Path &path) override { return m_fs->GetFreeSpaceSize(out, path); }
virtual Result DoGetTotalSpaceSize(s64 *out, const fs::Path &path) override { return m_fs->GetTotalSpaceSize(out, path); }
virtual Result DoCleanDirectoryRecursively(const fs::Path &path) override { return m_fs->CleanDirectoryRecursively(path); }
/* These aren't accessible as commands. */
virtual Result DoCommitProvisionally(s64 counter) override { return m_fs->CommitProvisionally(counter); }
virtual Result DoRollback() override { return m_fs->Rollback(); }
virtual Result DoFlush() override { return m_fs->Flush(); }
};
}

View file

@ -18,6 +18,7 @@
namespace ams::fs { namespace ams::fs {
/* ACCURATE_TO_VERSION: Unknown */
bool IsSignedSystemPartitionOnSdCardValid(const char *system_root_path); bool IsSignedSystemPartitionOnSdCardValid(const char *system_root_path);
bool IsSignedSystemPartitionOnSdCardValidDeprecated(); bool IsSignedSystemPartitionOnSdCardValidDeprecated();

View file

@ -18,6 +18,7 @@
namespace ams::fs { namespace ams::fs {
/* ACCURATE_TO_VERSION: Unknown */
enum class SpeedEmulationMode { enum class SpeedEmulationMode {
None = 0, None = 0,
Faster = 1, Faster = 1,

View file

@ -18,6 +18,7 @@
namespace ams::fs { namespace ams::fs {
/* ACCURATE_TO_VERSION: Unknown */
enum StorageType : s32 { enum StorageType : s32 {
StorageType_SaveData = 0, StorageType_SaveData = 0,
StorageType_RomFs = 1, StorageType_RomFs = 1,

View file

@ -19,6 +19,7 @@
namespace ams::fs { namespace ams::fs {
/* ACCURATE_TO_VERSION: Unknown */
class SubStorage : public ::ams::fs::IStorage, public ::ams::fs::impl::Newable { class SubStorage : public ::ams::fs::IStorage, public ::ams::fs::impl::Newable {
private: private:
std::shared_ptr<IStorage> m_shared_base_storage; std::shared_ptr<IStorage> m_shared_base_storage;

View file

@ -18,6 +18,7 @@
namespace ams::fs { namespace ams::fs {
/* ACCURATE_TO_VERSION: Unknown */
Result QueryMountSystemDataCacheSize(size_t *out, ncm::SystemDataId data_id); Result QueryMountSystemDataCacheSize(size_t *out, ncm::SystemDataId data_id);
Result MountSystemData(const char *name, ncm::SystemDataId data_id); Result MountSystemData(const char *name, ncm::SystemDataId data_id);

View file

@ -19,6 +19,7 @@
namespace ams::fs { namespace ams::fs {
/* ACCURATE_TO_VERSION: Unknown */
void DisableAutoSaveDataCreation(); void DisableAutoSaveDataCreation();
Result CreateSystemSaveData(SystemSaveDataId save_id, s64 size, s64 journal_size, u32 flags); Result CreateSystemSaveData(SystemSaveDataId save_id, s64 size, s64 journal_size, u32 flags);

View file

@ -20,6 +20,7 @@
namespace ams::fs::fsa { namespace ams::fs::fsa {
/* ACCURATE_TO_VERSION: Unknown */
class IDirectory { class IDirectory {
public: public:
virtual ~IDirectory() { /* ... */ } virtual ~IDirectory() { /* ... */ }

View file

@ -22,6 +22,7 @@
namespace ams::fs::fsa { namespace ams::fs::fsa {
/* ACCURATE_TO_VERSION: Unknown */
class IFile; class IFile;
class IDirectory; class IDirectory;

View file

@ -19,6 +19,7 @@
namespace ams::fs::fsa { namespace ams::fs::fsa {
/* ACCURATE_TO_VERSION: Unknown */
class ICommonMountNameGenerator { class ICommonMountNameGenerator {
public: public:
virtual ~ICommonMountNameGenerator() { /* ... */ } virtual ~ICommonMountNameGenerator() { /* ... */ }

View file

@ -23,6 +23,7 @@
namespace ams::fs::impl { namespace ams::fs::impl {
/* ACCURATE_TO_VERSION: Unknown */
enum AccessLogTarget : u32 { enum AccessLogTarget : u32 {
AccessLogTarget_None = (0 << 0), AccessLogTarget_None = (0 << 0),
AccessLogTarget_Application = (1 << 0), AccessLogTarget_Application = (1 << 0),

View file

@ -17,6 +17,8 @@
namespace ams::fs::impl { namespace ams::fs::impl {
/* ACCURATE_TO_VERSION: Unknown */
/* Delimiting of mount names. */ /* Delimiting of mount names. */
constexpr inline const char ReservedMountNamePrefixCharacter = '@'; constexpr inline const char ReservedMountNamePrefixCharacter = '@';

View file

@ -18,6 +18,7 @@
namespace ams::fs::impl { namespace ams::fs::impl {
/* ACCURATE_TO_VERSION: Unknown */
Result QueryMountDataCacheSize(size_t *out, ncm::DataId data_id, ncm::StorageId storage_id); Result QueryMountDataCacheSize(size_t *out, ncm::DataId data_id, ncm::StorageId storage_id);
Result MountData(const char *name, ncm::DataId data_id, ncm::StorageId storage_id); Result MountData(const char *name, ncm::DataId data_id, ncm::StorageId storage_id);

View file

@ -18,6 +18,7 @@
namespace ams::fs::impl { namespace ams::fs::impl {
/* ACCURATE_TO_VERSION: Unknown */
enum FileSystemProxyType { enum FileSystemProxyType {
FileSystemProxyType_Code = 0, FileSystemProxyType_Code = 0,
FileSystemProxyType_Rom = 1, FileSystemProxyType_Rom = 1,

View file

@ -19,6 +19,7 @@
namespace ams::fs::impl { namespace ams::fs::impl {
/* ACCURATE_TO_VERSION: Unknown */
constexpr inline u8 TlsIoPriorityMask = 0x7; constexpr inline u8 TlsIoPriorityMask = 0x7;
constexpr inline u8 TlsIoRecursiveCallMask = 0x8; constexpr inline u8 TlsIoRecursiveCallMask = 0x8;

View file

@ -18,6 +18,7 @@
namespace ams::fs::impl { namespace ams::fs::impl {
/* ACCURATE_TO_VERSION: Unknown */
fssystem::IHash256GeneratorFactorySelector *GetNcaHashGeneratorFactorySelector(); fssystem::IHash256GeneratorFactorySelector *GetNcaHashGeneratorFactorySelector();
fssystem::IHash256GeneratorFactorySelector *GetSaveDataHashGeneratorFactorySelector(); fssystem::IHash256GeneratorFactorySelector *GetSaveDataHashGeneratorFactorySelector();

View file

@ -18,6 +18,7 @@
namespace ams::fs::impl { namespace ams::fs::impl {
/* ACCURATE_TO_VERSION: Unknown */
class Newable { class Newable {
public: public:
static ALWAYS_INLINE void *operator new(size_t size) noexcept { static ALWAYS_INLINE void *operator new(size_t size) noexcept {

View file

@ -20,6 +20,7 @@
namespace ams::fs::impl { namespace ams::fs::impl {
/* ACCURATE_TO_VERSION: Unknown */
enum TlsIoPriority : u8 { enum TlsIoPriority : u8 {
TlsIoPriority_Normal = 0, TlsIoPriority_Normal = 0,
TlsIoPriority_Realtime = 1, TlsIoPriority_Realtime = 1,

View file

@ -18,6 +18,7 @@
namespace ams::fs::impl { namespace ams::fs::impl {
/* ACCURATE_TO_VERSION: Unknown */
bool IsAbortNeeded(Result result); bool IsAbortNeeded(Result result);
void LogErrorMessage(Result result, const char *function); void LogErrorMessage(Result result, const char *function);

View file

@ -19,6 +19,7 @@
namespace ams::fssrv::fscreator { namespace ams::fssrv::fscreator {
/* ACCURATE_TO_VERSION: 13.4.0.0 */
class LocalFileSystemCreator final : public ILocalFileSystemCreator { class LocalFileSystemCreator final : public ILocalFileSystemCreator {
NON_COPYABLE(LocalFileSystemCreator); NON_COPYABLE(LocalFileSystemCreator);
NON_MOVEABLE(LocalFileSystemCreator); NON_MOVEABLE(LocalFileSystemCreator);

View file

@ -19,6 +19,7 @@
namespace ams::fssrv::fscreator { namespace ams::fssrv::fscreator {
/* ACCURATE_TO_VERSION: Unknown */
class PartitionFileSystemCreator : public IPartitionFileSystemCreator { class PartitionFileSystemCreator : public IPartitionFileSystemCreator {
NON_COPYABLE(PartitionFileSystemCreator); NON_COPYABLE(PartitionFileSystemCreator);
NON_MOVEABLE(PartitionFileSystemCreator); NON_MOVEABLE(PartitionFileSystemCreator);

View file

@ -19,6 +19,7 @@
namespace ams::fssrv::fscreator { namespace ams::fssrv::fscreator {
/* ACCURATE_TO_VERSION: Unknown */
class RomFileSystemCreator : public IRomFileSystemCreator { class RomFileSystemCreator : public IRomFileSystemCreator {
NON_COPYABLE(RomFileSystemCreator); NON_COPYABLE(RomFileSystemCreator);
NON_MOVEABLE(RomFileSystemCreator); NON_MOVEABLE(RomFileSystemCreator);

View file

@ -19,6 +19,7 @@
namespace ams::fssrv::fscreator { namespace ams::fssrv::fscreator {
/* ACCURATE_TO_VERSION: 13.4.0.0 */
class SubDirectoryFileSystemCreator final : public ISubDirectoryFileSystemCreator { class SubDirectoryFileSystemCreator final : public ISubDirectoryFileSystemCreator {
NON_COPYABLE(SubDirectoryFileSystemCreator); NON_COPYABLE(SubDirectoryFileSystemCreator);
NON_MOVEABLE(SubDirectoryFileSystemCreator); NON_MOVEABLE(SubDirectoryFileSystemCreator);

View file

@ -35,6 +35,7 @@ namespace ams::fssrv {
class AccessLogServiceImpl; class AccessLogServiceImpl;
class DebugConfigurationServiceImpl; class DebugConfigurationServiceImpl;
/* ACCURATE_TO_VERSION: Unknown */
struct FileSystemProxyConfiguration { struct FileSystemProxyConfiguration {
fscreator::FileSystemCreatorInterfaces *m_fs_creator_interfaces; fscreator::FileSystemCreatorInterfaces *m_fs_creator_interfaces;
BaseStorageServiceImpl *m_base_storage_service_impl; BaseStorageServiceImpl *m_base_storage_service_impl;

View file

@ -30,6 +30,7 @@ namespace ams::fssrv {
class NcaFileSystemService; class NcaFileSystemService;
class SaveDataFileSystemService; class SaveDataFileSystemService;
/* ACCURATE_TO_VERSION: Unknown */
class FileSystemProxyImpl { class FileSystemProxyImpl {
NON_COPYABLE(FileSystemProxyImpl); NON_COPYABLE(FileSystemProxyImpl);
NON_MOVEABLE(FileSystemProxyImpl); NON_MOVEABLE(FileSystemProxyImpl);
@ -147,26 +148,27 @@ namespace ams::fssrv {
static_assert(sf::IsIFileSystemProxy<FileSystemProxyImpl>); static_assert(sf::IsIFileSystemProxy<FileSystemProxyImpl>);
static_assert(sf::IsIFileSystemProxyForLoader<FileSystemProxyImpl>); static_assert(sf::IsIFileSystemProxyForLoader<FileSystemProxyImpl>);
/* ACCURATE_TO_VERSION: Unknown */
class InvalidFileSystemProxyImplForLoader { class InvalidFileSystemProxyImplForLoader {
public: public:
Result OpenCodeFileSystemDeprecated(ams::sf::Out<ams::sf::SharedPointer<fssrv::sf::IFileSystem>> out_fs, const fssrv::sf::Path &path, ncm::ProgramId program_id) { Result OpenCodeFileSystemDeprecated(ams::sf::Out<ams::sf::SharedPointer<fssrv::sf::IFileSystem>> out_fs, const fssrv::sf::Path &path, ncm::ProgramId program_id) {
AMS_UNUSED(out_fs, path, program_id); AMS_UNUSED(out_fs, path, program_id);
return fs::ResultPortAcceptableCountLimited(); R_THROW(fs::ResultPortAcceptableCountLimited());
} }
Result OpenCodeFileSystem(ams::sf::Out<ams::sf::SharedPointer<fssrv::sf::IFileSystem>> out_fs, ams::sf::Out<fs::CodeVerificationData> out_verif, const fssrv::sf::Path &path, ncm::ProgramId program_id) { Result OpenCodeFileSystem(ams::sf::Out<ams::sf::SharedPointer<fssrv::sf::IFileSystem>> out_fs, ams::sf::Out<fs::CodeVerificationData> out_verif, const fssrv::sf::Path &path, ncm::ProgramId program_id) {
AMS_UNUSED(out_fs, out_verif, path, program_id); AMS_UNUSED(out_fs, out_verif, path, program_id);
return fs::ResultPortAcceptableCountLimited(); R_THROW(fs::ResultPortAcceptableCountLimited());
} }
Result IsArchivedProgram(ams::sf::Out<bool> out, u64 process_id) { Result IsArchivedProgram(ams::sf::Out<bool> out, u64 process_id) {
AMS_UNUSED(out, process_id); AMS_UNUSED(out, process_id);
return fs::ResultPortAcceptableCountLimited(); R_THROW(fs::ResultPortAcceptableCountLimited());
} }
Result SetCurrentProcess(const ams::sf::ClientProcessId &client_pid) { Result SetCurrentProcess(const ams::sf::ClientProcessId &client_pid) {
AMS_UNUSED(client_pid); AMS_UNUSED(client_pid);
return fs::ResultPortAcceptableCountLimited(); R_THROW(fs::ResultPortAcceptableCountLimited());
} }
}; };
static_assert(sf::IsIFileSystemProxyForLoader<FileSystemProxyImpl>); static_assert(sf::IsIFileSystemProxyForLoader<FileSystemProxyImpl>);

View file

@ -49,18 +49,21 @@ namespace ams::fssystem {
namespace ams::fssrv::fscreator { namespace ams::fssrv::fscreator {
/* ACCURATE_TO_VERSION: Unknown */
class IRomFileSystemCreator { class IRomFileSystemCreator {
public: public:
virtual ~IRomFileSystemCreator() { /* ... */ } virtual ~IRomFileSystemCreator() { /* ... */ }
virtual Result Create(std::shared_ptr<fs::fsa::IFileSystem> *out, std::shared_ptr<fs::IStorage> storage) = 0; virtual Result Create(std::shared_ptr<fs::fsa::IFileSystem> *out, std::shared_ptr<fs::IStorage> storage) = 0;
}; };
/* ACCURATE_TO_VERSION: Unknown */
class IPartitionFileSystemCreator { class IPartitionFileSystemCreator {
public: public:
virtual ~IPartitionFileSystemCreator() { /* ... */ } virtual ~IPartitionFileSystemCreator() { /* ... */ }
virtual Result Create(std::shared_ptr<fs::fsa::IFileSystem> *out, std::shared_ptr<fs::IStorage> storage) = 0; virtual Result Create(std::shared_ptr<fs::fsa::IFileSystem> *out, std::shared_ptr<fs::IStorage> storage) = 0;
}; };
/* ACCURATE_TO_VERSION: Unknown */
class IStorageOnNcaCreator { class IStorageOnNcaCreator {
public: public:
virtual ~IStorageOnNcaCreator() { /* ... */ } virtual ~IStorageOnNcaCreator() { /* ... */ }
@ -69,6 +72,7 @@ namespace ams::fssrv::fscreator {
virtual Result CreateNcaReader(std::shared_ptr<fssystem::NcaReader> *out, std::shared_ptr<fs::IStorage> storage) = 0; virtual Result CreateNcaReader(std::shared_ptr<fssystem::NcaReader> *out, std::shared_ptr<fs::IStorage> storage) = 0;
}; };
/* ACCURATE_TO_VERSION: Unknown */
class ILocalFileSystemCreator { class ILocalFileSystemCreator {
public: public:
virtual Result Create(std::shared_ptr<fs::fsa::IFileSystem> *out, const fs::Path &path, bool case_sensitive, bool ensure_root, Result on_path_not_found) = 0; virtual Result Create(std::shared_ptr<fs::fsa::IFileSystem> *out, const fs::Path &path, bool case_sensitive, bool ensure_root, Result on_path_not_found) = 0;
@ -78,11 +82,13 @@ namespace ams::fssrv::fscreator {
} }
}; };
/* ACCURATE_TO_VERSION: Unknown */
class ISubDirectoryFileSystemCreator { class ISubDirectoryFileSystemCreator {
public: public:
virtual Result Create(std::shared_ptr<fs::fsa::IFileSystem> *out, std::shared_ptr<fs::fsa::IFileSystem> base_fs, const fs::Path &path) = 0; virtual Result Create(std::shared_ptr<fs::fsa::IFileSystem> *out, std::shared_ptr<fs::fsa::IFileSystem> base_fs, const fs::Path &path) = 0;
}; };
/* ACCURATE_TO_VERSION: Unknown */
struct FileSystemCreatorInterfaces { struct FileSystemCreatorInterfaces {
ILocalFileSystemCreator *local_fs_creator; ILocalFileSystemCreator *local_fs_creator;
ISubDirectoryFileSystemCreator *subdir_fs_creator; ISubDirectoryFileSystemCreator *subdir_fs_creator;

View file

@ -20,6 +20,7 @@
namespace ams::fssrv { namespace ams::fssrv {
/* ACCURATE_TO_VERSION: Unknown */
class MemoryResourceFromExpHeap : public ams::MemoryResource { class MemoryResourceFromExpHeap : public ams::MemoryResource {
private: private:
lmem::HeapHandle m_heap_handle; lmem::HeapHandle m_heap_handle;
@ -41,6 +42,7 @@ namespace ams::fssrv {
} }
}; };
/* ACCURATE_TO_VERSION: Unknown */
class PeakCheckableMemoryResourceFromExpHeap : public ams::MemoryResource { class PeakCheckableMemoryResourceFromExpHeap : public ams::MemoryResource {
private: private:
lmem::HeapHandle m_heap_handle; lmem::HeapHandle m_heap_handle;

View file

@ -25,6 +25,7 @@ namespace ams::mem {
namespace ams::fssrv { namespace ams::fssrv {
/* ACCURATE_TO_VERSION: Unknown */
class MemoryResourceFromStandardAllocator : public ams::MemoryResource { class MemoryResourceFromStandardAllocator : public ams::MemoryResource {
private: private:
mem::StandardAllocator *m_allocator; mem::StandardAllocator *m_allocator;

View file

@ -47,6 +47,7 @@ namespace ams::fssrv {
} }
/* ACCURATE_TO_VERSION: Unknown */
class NcaFileSystemServiceImpl { class NcaFileSystemServiceImpl {
public: public:
struct Configuration { struct Configuration {

View file

@ -27,6 +27,7 @@ namespace ams::fssrv {
} }
/* ACCURATE_TO_VERSION: Unknown */
class ProgramRegistryImpl { class ProgramRegistryImpl {
NON_COPYABLE(ProgramRegistryImpl); NON_COPYABLE(ProgramRegistryImpl);
NON_MOVEABLE(ProgramRegistryImpl); NON_MOVEABLE(ProgramRegistryImpl);
@ -45,26 +46,27 @@ namespace ams::fssrv {
}; };
static_assert(sf::IsIProgramRegistry<ProgramRegistryImpl>); static_assert(sf::IsIProgramRegistry<ProgramRegistryImpl>);
/* ACCURATE_TO_VERSION: Unknown */
class InvalidProgramRegistryImpl { class InvalidProgramRegistryImpl {
public: public:
Result RegisterProgram(u64 process_id, u64 program_id, u8 storage_id, const ams::sf::InBuffer &data, s64 data_size, const ams::sf::InBuffer &desc, s64 desc_size) { Result RegisterProgram(u64 process_id, u64 program_id, u8 storage_id, const ams::sf::InBuffer &data, s64 data_size, const ams::sf::InBuffer &desc, s64 desc_size) {
AMS_UNUSED(process_id, program_id, storage_id, data, data_size, desc, desc_size); AMS_UNUSED(process_id, program_id, storage_id, data, data_size, desc, desc_size);
return fs::ResultPortAcceptableCountLimited(); R_THROW(fs::ResultPortAcceptableCountLimited());
} }
Result UnregisterProgram(u64 process_id) { Result UnregisterProgram(u64 process_id) {
AMS_UNUSED(process_id); AMS_UNUSED(process_id);
return fs::ResultPortAcceptableCountLimited(); R_THROW(fs::ResultPortAcceptableCountLimited());
} }
Result SetCurrentProcess(const ams::sf::ClientProcessId &client_pid) { Result SetCurrentProcess(const ams::sf::ClientProcessId &client_pid) {
AMS_UNUSED(client_pid); AMS_UNUSED(client_pid);
return fs::ResultPortAcceptableCountLimited(); R_THROW(fs::ResultPortAcceptableCountLimited());
} }
Result SetEnabledProgramVerification(bool en) { Result SetEnabledProgramVerification(bool en) {
AMS_UNUSED(en); AMS_UNUSED(en);
return fs::ResultPortAcceptableCountLimited(); R_THROW(fs::ResultPortAcceptableCountLimited());
} }
}; };
static_assert(sf::IsIProgramRegistry<InvalidProgramRegistryImpl>); static_assert(sf::IsIProgramRegistry<InvalidProgramRegistryImpl>);

View file

@ -27,6 +27,7 @@ namespace ams::fssrv {
} }
/* ACCURATE_TO_VERSION: Unknown */
class ProgramRegistryServiceImpl { class ProgramRegistryServiceImpl {
public: public:
struct Configuration { struct Configuration {

View file

@ -28,6 +28,7 @@ namespace ams::fssrv {
namespace ams::fssrv::impl { namespace ams::fssrv::impl {
/* ACCURATE_TO_VERSION: 13.4.0.0 */
struct Accessibility { struct Accessibility {
u8 value; u8 value;
@ -60,6 +61,7 @@ namespace ams::fssrv::impl {
Accessibility GetAccessibility() const { return m_accessibility; } Accessibility GetAccessibility() const { return m_accessibility; }
}; };
/* ACCURATE_TO_VERSION: 13.4.0.0 */
class AccessControl { class AccessControl {
public: public:
enum class AccessibilityType : u32 { enum class AccessibilityType : u32 {

View file

@ -21,6 +21,7 @@
namespace ams::fssrv::impl { namespace ams::fssrv::impl {
/* ACCURATE_TO_VERSION: 13.4.0.0 */
#define AMS_FSSRV_FOR_EACH_ACCESS_CONTROL_CAPABILITY(HANDLER, _NS_) \ #define AMS_FSSRV_FOR_EACH_ACCESS_CONTROL_CAPABILITY(HANDLER, _NS_) \
HANDLER(CanAbandonAccessFailure, _NS_::AccessFailureResolution) \ HANDLER(CanAbandonAccessFailure, _NS_::AccessFailureResolution) \
HANDLER(CanChallengeCardExistence, _NS_::GameCard) \ HANDLER(CanChallengeCardExistence, _NS_::GameCard) \
@ -179,6 +180,7 @@ namespace ams::fssrv::impl {
HANDLER(CanWriteSaveDataFileSystemExtraDataFlags, _NS_::SaveDataTransferVersion2, _NS_::SystemSaveDataManagement, _NS_::SaveDataBackUp) \ HANDLER(CanWriteSaveDataFileSystemExtraDataFlags, _NS_::SaveDataTransferVersion2, _NS_::SystemSaveDataManagement, _NS_::SaveDataBackUp) \
HANDLER(CanWriteSaveDataFileSystemExtraDataTimeStamp, _NS_::SaveDataBackUp) HANDLER(CanWriteSaveDataFileSystemExtraDataTimeStamp, _NS_::SaveDataBackUp)
/* ACCURATE_TO_VERSION: 13.4.0.0 */
class AccessControlBits { class AccessControlBits {
public: public:
enum class Bits : u64 { enum class Bits : u64 {

View file

@ -22,6 +22,7 @@
namespace ams::fssrv::impl { namespace ams::fssrv::impl {
/* ACCURATE_TO_VERSION: 13.4.0.0 */
class ExternalKeyEntry : public util::IntrusiveListBaseNode<ExternalKeyEntry>, public ::ams::fs::impl::Newable { class ExternalKeyEntry : public util::IntrusiveListBaseNode<ExternalKeyEntry>, public ::ams::fs::impl::Newable {
private: private:
fs::RightsId m_rights_id; fs::RightsId m_rights_id;
@ -48,6 +49,7 @@ namespace ams::fssrv::impl {
} }
}; };
/* ACCURATE_TO_VERSION: 13.4.0.0 */
class ExternalKeyManager { class ExternalKeyManager {
NON_COPYABLE(ExternalKeyManager); NON_COPYABLE(ExternalKeyManager);
NON_MOVEABLE(ExternalKeyManager); NON_MOVEABLE(ExternalKeyManager);

View file

@ -22,6 +22,7 @@
namespace ams::fssrv::impl { namespace ams::fssrv::impl {
/* ACCURATE_TO_VERSION: 13.4.0.0 */
ams::sf::EmplacedRef<fssrv::sf::IFileSystemProxy, fssrv::FileSystemProxyImpl> GetFileSystemProxyServiceObject(); ams::sf::EmplacedRef<fssrv::sf::IFileSystemProxy, fssrv::FileSystemProxyImpl> GetFileSystemProxyServiceObject();
ams::sf::SharedPointer<fssrv::sf::IProgramRegistry> GetProgramRegistryServiceObject(); ams::sf::SharedPointer<fssrv::sf::IProgramRegistry> GetProgramRegistryServiceObject();

View file

@ -22,12 +22,14 @@
namespace ams::fssrv::impl { namespace ams::fssrv::impl {
/* ACCURATE_TO_VERSION: 13.4.0.0 */
struct ProgramIndexMapInfoEntry : public ::ams::util::IntrusiveListBaseNode<ProgramIndexMapInfoEntry>, public ::ams::fs::impl::Newable { struct ProgramIndexMapInfoEntry : public ::ams::util::IntrusiveListBaseNode<ProgramIndexMapInfoEntry>, public ::ams::fs::impl::Newable {
ncm::ProgramId program_id; ncm::ProgramId program_id;
ncm::ProgramId base_program_id; ncm::ProgramId base_program_id;
u8 program_index; u8 program_index;
}; };
/* ACCURATE_TO_VERSION: 13.4.0.0 */
class ProgramIndexMapInfoManager { class ProgramIndexMapInfoManager {
NON_COPYABLE(ProgramIndexMapInfoManager); NON_COPYABLE(ProgramIndexMapInfoManager);
NON_MOVEABLE(ProgramIndexMapInfoManager); NON_MOVEABLE(ProgramIndexMapInfoManager);

View file

@ -37,6 +37,7 @@ namespace ams::fssrv::impl {
class FileSystemInterfaceAdapter; class FileSystemInterfaceAdapter;
/* ACCURATE_TO_VERSION: 13.4.0.0 */
class FileInterfaceAdapter { class FileInterfaceAdapter {
NON_COPYABLE(FileInterfaceAdapter); NON_COPYABLE(FileInterfaceAdapter);
NON_MOVEABLE(FileInterfaceAdapter); NON_MOVEABLE(FileInterfaceAdapter);
@ -60,6 +61,7 @@ namespace ams::fssrv::impl {
}; };
static_assert(fssrv::sf::IsIFile<FileInterfaceAdapter>); static_assert(fssrv::sf::IsIFile<FileInterfaceAdapter>);
/* ACCURATE_TO_VERSION: 13.4.0.0 */
class DirectoryInterfaceAdapter { class DirectoryInterfaceAdapter {
NON_COPYABLE(DirectoryInterfaceAdapter); NON_COPYABLE(DirectoryInterfaceAdapter);
NON_MOVEABLE(DirectoryInterfaceAdapter); NON_MOVEABLE(DirectoryInterfaceAdapter);
@ -76,6 +78,7 @@ namespace ams::fssrv::impl {
}; };
static_assert(fssrv::sf::IsIDirectory<DirectoryInterfaceAdapter>); static_assert(fssrv::sf::IsIDirectory<DirectoryInterfaceAdapter>);
/* ACCURATE_TO_VERSION: 13.4.0.0 */
class FileSystemInterfaceAdapter : public ams::sf::ISharedObject { class FileSystemInterfaceAdapter : public ams::sf::ISharedObject {
NON_COPYABLE(FileSystemInterfaceAdapter); NON_COPYABLE(FileSystemInterfaceAdapter);
NON_MOVEABLE(FileSystemInterfaceAdapter); NON_MOVEABLE(FileSystemInterfaceAdapter);

View file

@ -27,6 +27,7 @@ namespace ams::fs {
namespace ams::fssrv::impl { namespace ams::fssrv::impl {
/* ACCURATE_TO_VERSION: 13.4.0.0 */
class StorageInterfaceAdapter { class StorageInterfaceAdapter {
NON_COPYABLE(StorageInterfaceAdapter); NON_COPYABLE(StorageInterfaceAdapter);
private: private:

View file

@ -18,6 +18,7 @@
#include <stratosphere/sf.hpp> #include <stratosphere/sf.hpp>
/* TODO */ /* TODO */
/* ACCURATE_TO_VERSION: 13.4.0.0 */
#define AMS_FSSRV_I_DEVICE_OPERATOR_INTERFACE_INFO(C, H) \ #define AMS_FSSRV_I_DEVICE_OPERATOR_INTERFACE_INFO(C, H) \
AMS_SF_METHOD_INFO(C, H, 0, Result, IsSdCardInserted, (ams::sf::Out<bool> out), (out)) \ AMS_SF_METHOD_INFO(C, H, 0, Result, IsSdCardInserted, (ams::sf::Out<bool> out), (out)) \
AMS_SF_METHOD_INFO(C, H, 200, Result, IsGameCardInserted, (ams::sf::Out<bool> out), (out)) \ AMS_SF_METHOD_INFO(C, H, 200, Result, IsGameCardInserted, (ams::sf::Out<bool> out), (out)) \

View file

@ -17,6 +17,7 @@
#include <vapours.hpp> #include <vapours.hpp>
#include <stratosphere/sf.hpp> #include <stratosphere/sf.hpp>
/* ACCURATE_TO_VERSION: 13.4.0.0 */
#define AMS_FSSRV_I_EVENT_NOTIFIER_INTERFACE_INFO(C, H) \ #define AMS_FSSRV_I_EVENT_NOTIFIER_INTERFACE_INFO(C, H) \
AMS_SF_METHOD_INFO(C, H, 0, Result, GetEventHandle, (ams::sf::OutCopyHandle out), (out)) AMS_SF_METHOD_INFO(C, H, 0, Result, GetEventHandle, (ams::sf::OutCopyHandle out), (out))

View file

@ -21,6 +21,7 @@
#include <stratosphere/fssrv/sf/fssrv_sf_i_device_operator.hpp> #include <stratosphere/fssrv/sf/fssrv_sf_i_device_operator.hpp>
#include <stratosphere/fssrv/sf/fssrv_sf_i_event_notifier.hpp> #include <stratosphere/fssrv/sf/fssrv_sf_i_event_notifier.hpp>
/* ACCURATE_TO_VERSION: 13.4.0.0 */
#define AMS_FSSRV_I_FILE_SYSTEM_PROXY_INTERFACE_INFO(C, H) \ #define AMS_FSSRV_I_FILE_SYSTEM_PROXY_INTERFACE_INFO(C, H) \
AMS_SF_METHOD_INFO(C, H, 0, Result, OpenFileSystem, (ams::sf::Out<ams::sf::SharedPointer<fssrv::sf::IFileSystem>> out, const fssrv::sf::FspPath &path, u32 type), (out, path, type), hos::Version_Min, hos::Version_1_0_0) \ AMS_SF_METHOD_INFO(C, H, 0, Result, OpenFileSystem, (ams::sf::Out<ams::sf::SharedPointer<fssrv::sf::IFileSystem>> out, const fssrv::sf::FspPath &path, u32 type), (out, path, type), hos::Version_Min, hos::Version_1_0_0) \
AMS_SF_METHOD_INFO(C, H, 1, Result, SetCurrentProcess, (const ams::sf::ClientProcessId &client_pid), (client_pid)) \ AMS_SF_METHOD_INFO(C, H, 1, Result, SetCurrentProcess, (const ams::sf::ClientProcessId &client_pid), (client_pid)) \

View file

@ -19,6 +19,7 @@
#include <stratosphere/fssrv/sf/fssrv_sf_ifilesystem.hpp> #include <stratosphere/fssrv/sf/fssrv_sf_ifilesystem.hpp>
#include <stratosphere/fs/fs_code_verification_data.hpp> #include <stratosphere/fs/fs_code_verification_data.hpp>
/* ACCURATE_TO_VERSION: 13.4.0.0 */
#define AMS_FSSRV_I_FILE_SYSTEM_PROXY_FOR_LOADER_INTERFACE_INFO(C, H) \ #define AMS_FSSRV_I_FILE_SYSTEM_PROXY_FOR_LOADER_INTERFACE_INFO(C, H) \
AMS_SF_METHOD_INFO(C, H, 0, Result, OpenCodeFileSystemDeprecated, (ams::sf::Out<ams::sf::SharedPointer<fssrv::sf::IFileSystem>> out_fs, const fssrv::sf::Path &path, ncm::ProgramId program_id), (out_fs, path, program_id), hos::Version_Min, hos::Version_9_2_0) \ AMS_SF_METHOD_INFO(C, H, 0, Result, OpenCodeFileSystemDeprecated, (ams::sf::Out<ams::sf::SharedPointer<fssrv::sf::IFileSystem>> out_fs, const fssrv::sf::Path &path, ncm::ProgramId program_id), (out_fs, path, program_id), hos::Version_Min, hos::Version_9_2_0) \
AMS_SF_METHOD_INFO(C, H, 0, Result, OpenCodeFileSystem, (ams::sf::Out<ams::sf::SharedPointer<fssrv::sf::IFileSystem>> out_fs, ams::sf::Out<fs::CodeVerificationData> out_verif, const fssrv::sf::Path &path, ncm::ProgramId program_id), (out_fs, out_verif, path, program_id), hos::Version_10_0_0) \ AMS_SF_METHOD_INFO(C, H, 0, Result, OpenCodeFileSystem, (ams::sf::Out<ams::sf::SharedPointer<fssrv::sf::IFileSystem>> out_fs, ams::sf::Out<fs::CodeVerificationData> out_verif, const fssrv::sf::Path &path, ncm::ProgramId program_id), (out_fs, out_verif, path, program_id), hos::Version_10_0_0) \

View file

@ -19,6 +19,7 @@
#include <stratosphere/fs/fs_code.hpp> #include <stratosphere/fs/fs_code.hpp>
#include <stratosphere/fssrv/sf/fssrv_sf_ifilesystem.hpp> #include <stratosphere/fssrv/sf/fssrv_sf_ifilesystem.hpp>
/* ACCURATE_TO_VERSION: 13.4.0.0 */
#define AMS_FSSRV_I_PROGRAM_REGISTRY_INTERFACE_INFO(C, H) \ #define AMS_FSSRV_I_PROGRAM_REGISTRY_INTERFACE_INFO(C, H) \
AMS_SF_METHOD_INFO(C, H, 0, Result, RegisterProgram, (u64 process_id, u64 program_id, u8 storage_id, const ams::sf::InBuffer &data, s64 data_size, const ams::sf::InBuffer &desc, s64 desc_size), (process_id, program_id, storage_id, data, data_size, desc, desc_size)) \ AMS_SF_METHOD_INFO(C, H, 0, Result, RegisterProgram, (u64 process_id, u64 program_id, u8 storage_id, const ams::sf::InBuffer &data, s64 data_size, const ams::sf::InBuffer &desc, s64 desc_size), (process_id, program_id, storage_id, data, data_size, desc, desc_size)) \
AMS_SF_METHOD_INFO(C, H, 1, Result, UnregisterProgram, (u64 process_id), (process_id)) \ AMS_SF_METHOD_INFO(C, H, 1, Result, UnregisterProgram, (u64 process_id), (process_id)) \

View file

@ -18,6 +18,7 @@
#include <stratosphere/sf.hpp> #include <stratosphere/sf.hpp>
#include <stratosphere/fs/fs_directory.hpp> #include <stratosphere/fs/fs_directory.hpp>
/* ACCURATE_TO_VERSION: 13.4.0.0 */
#define AMS_FSSRV_I_DIRECTORY_INTERFACE_INFO(C, H) \ #define AMS_FSSRV_I_DIRECTORY_INTERFACE_INFO(C, H) \
AMS_SF_METHOD_INFO(C, H, 0, Result, Read, (ams::sf::Out<s64> out, const ams::sf::OutBuffer &out_entries), (out, out_entries)) \ AMS_SF_METHOD_INFO(C, H, 0, Result, Read, (ams::sf::Out<s64> out, const ams::sf::OutBuffer &out_entries), (out, out_entries)) \
AMS_SF_METHOD_INFO(C, H, 1, Result, GetEntryCount, (ams::sf::Out<s64> out), (out)) AMS_SF_METHOD_INFO(C, H, 1, Result, GetEntryCount, (ams::sf::Out<s64> out), (out))

View file

@ -19,6 +19,7 @@
#include <stratosphere/fs/fs_file.hpp> #include <stratosphere/fs/fs_file.hpp>
#include <stratosphere/fs/fs_query_range.hpp> #include <stratosphere/fs/fs_query_range.hpp>
/* ACCURATE_TO_VERSION: 13.4.0.0 */
#define AMS_FSSRV_I_FILE_INTERFACE_INFO(C, H) \ #define AMS_FSSRV_I_FILE_INTERFACE_INFO(C, H) \
AMS_SF_METHOD_INFO(C, H, 0, Result, Read, (ams::sf::Out<s64> out, s64 offset, const ams::sf::OutNonSecureBuffer &buffer, s64 size, ams::fs::ReadOption option), (out, offset, buffer, size, option)) \ AMS_SF_METHOD_INFO(C, H, 0, Result, Read, (ams::sf::Out<s64> out, s64 offset, const ams::sf::OutNonSecureBuffer &buffer, s64 size, ams::fs::ReadOption option), (out, offset, buffer, size, option)) \
AMS_SF_METHOD_INFO(C, H, 1, Result, Write, (s64 offset, const ams::sf::InNonSecureBuffer &buffer, s64 size, ams::fs::WriteOption option), (offset, buffer, size, option)) \ AMS_SF_METHOD_INFO(C, H, 1, Result, Write, (s64 offset, const ams::sf::InNonSecureBuffer &buffer, s64 size, ams::fs::WriteOption option), (offset, buffer, size, option)) \

View file

@ -22,6 +22,7 @@
#include <stratosphere/fssrv/sf/fssrv_sf_ifile.hpp> #include <stratosphere/fssrv/sf/fssrv_sf_ifile.hpp>
#include <stratosphere/fssrv/sf/fssrv_sf_idirectory.hpp> #include <stratosphere/fssrv/sf/fssrv_sf_idirectory.hpp>
/* ACCURATE_TO_VERSION: 13.4.0.0 */
#define AMS_FSSRV_I_FILESYSTEM_INTERFACE_INFO(C, H) \ #define AMS_FSSRV_I_FILESYSTEM_INTERFACE_INFO(C, H) \
AMS_SF_METHOD_INFO(C, H, 0, Result, CreateFile, (const ams::fssrv::sf::Path &path, s64 size, s32 option), (path, size, option)) \ AMS_SF_METHOD_INFO(C, H, 0, Result, CreateFile, (const ams::fssrv::sf::Path &path, s64 size, s32 option), (path, size, option)) \
AMS_SF_METHOD_INFO(C, H, 1, Result, DeleteFile, (const ams::fssrv::sf::Path &path), (path)) \ AMS_SF_METHOD_INFO(C, H, 1, Result, DeleteFile, (const ams::fssrv::sf::Path &path), (path)) \

View file

@ -19,6 +19,7 @@
#include <stratosphere/fs/fs_file.hpp> #include <stratosphere/fs/fs_file.hpp>
#include <stratosphere/fs/fs_query_range.hpp> #include <stratosphere/fs/fs_query_range.hpp>
/* ACCURATE_TO_VERSION: 13.4.0.0 */
#define AMS_FSSRV_I_STORAGE_INTERFACE_INFO(C, H) \ #define AMS_FSSRV_I_STORAGE_INTERFACE_INFO(C, H) \
AMS_SF_METHOD_INFO(C, H, 0, Result, Read, (s64 offset, const ams::sf::OutNonSecureBuffer &buffer, s64 size), (offset, buffer, size)) \ AMS_SF_METHOD_INFO(C, H, 0, Result, Read, (s64 offset, const ams::sf::OutNonSecureBuffer &buffer, s64 size), (offset, buffer, size)) \
AMS_SF_METHOD_INFO(C, H, 1, Result, Write, (s64 offset, const ams::sf::InNonSecureBuffer &buffer, s64 size), (offset, buffer, size)) \ AMS_SF_METHOD_INFO(C, H, 1, Result, Write, (s64 offset, const ams::sf::InNonSecureBuffer &buffer, s64 size), (offset, buffer, size)) \

View file

@ -20,6 +20,7 @@
namespace ams::fssrv::sf { namespace ams::fssrv::sf {
/* ACCURATE_TO_VERSION: 13.4.0.0 */
struct Path : public ams::sf::LargeData { struct Path : public ams::sf::LargeData {
char str[fs::EntryNameLengthMax + 1]; char str[fs::EntryNameLengthMax + 1];

View file

@ -26,6 +26,7 @@ namespace ams::fssystem::buffers {
} }
/* ACCURATE_TO_VERSION: Unknown */
template<typename F, typename OnFailure> template<typename F, typename OnFailure>
Result DoContinuouslyUntilBufferIsAllocated(F f, OnFailure on_failure, const char *function_name) { Result DoContinuouslyUntilBufferIsAllocated(F f, OnFailure on_failure, const char *function_name) {
constexpr auto BufferAllocationRetryLogCountMax = 10; constexpr auto BufferAllocationRetryLogCountMax = 10;
@ -55,6 +56,7 @@ namespace ams::fssystem::buffers {
return ResultSuccess(); return ResultSuccess();
} }
/* ACCURATE_TO_VERSION: Unknown */
class BufferManagerContext { class BufferManagerContext {
private: private:
bool m_needs_blocking; bool m_needs_blocking;
@ -70,6 +72,7 @@ namespace ams::fssystem::buffers {
BufferManagerContext *GetBufferManagerContext(); BufferManagerContext *GetBufferManagerContext();
void EnableBlockingBufferManagerAllocation(); void EnableBlockingBufferManagerAllocation();
/* ACCURATE_TO_VERSION: Unknown */
class ScopedBufferManagerContextRegistration { class ScopedBufferManagerContextRegistration {
private: private:
BufferManagerContext m_cur_context; BufferManagerContext m_cur_context;
@ -88,6 +91,7 @@ namespace ams::fssystem::buffers {
} }
}; };
/* ACCURATE_TO_VERSION: Unknown */
template<typename IsValidBufferFunction> template<typename IsValidBufferFunction>
Result AllocateBufferUsingBufferManagerContext(fs::IBufferManager::MemoryRange *out, fs::IBufferManager *buffer_manager, size_t size, const fs::IBufferManager::BufferAttribute attribute, IsValidBufferFunction is_valid_buffer, const char *func_name) { Result AllocateBufferUsingBufferManagerContext(fs::IBufferManager::MemoryRange *out, fs::IBufferManager *buffer_manager, size_t size, const fs::IBufferManager::BufferAttribute attribute, IsValidBufferFunction is_valid_buffer, const char *func_name) {
AMS_ASSERT(out != nullptr); AMS_ASSERT(out != nullptr);

View file

@ -20,6 +20,7 @@
namespace ams::fssystem { namespace ams::fssystem {
/* ACCURATE_TO_VERSION: Unknown */
class FileSystemBuddyHeap { class FileSystemBuddyHeap {
NON_COPYABLE(FileSystemBuddyHeap); NON_COPYABLE(FileSystemBuddyHeap);
NON_MOVEABLE(FileSystemBuddyHeap); NON_MOVEABLE(FileSystemBuddyHeap);

View file

@ -22,6 +22,7 @@
namespace ams::fssystem { namespace ams::fssystem {
/* ACCURATE_TO_VERSION: Unknown */
class FileSystemBufferManager : public fs::IBufferManager { class FileSystemBufferManager : public fs::IBufferManager {
NON_COPYABLE(FileSystemBufferManager); NON_COPYABLE(FileSystemBufferManager);
NON_MOVEABLE(FileSystemBufferManager); NON_MOVEABLE(FileSystemBufferManager);

View file

@ -20,6 +20,7 @@
namespace ams::fssystem { namespace ams::fssystem {
/* ACCURATE_TO_VERSION: Unknown */
class AesCtrCounterExtendedStorage : public ::ams::fs::IStorage, public ::ams::fs::impl::Newable { class AesCtrCounterExtendedStorage : public ::ams::fs::IStorage, public ::ams::fs::impl::Newable {
NON_COPYABLE(AesCtrCounterExtendedStorage); NON_COPYABLE(AesCtrCounterExtendedStorage);
NON_MOVEABLE(AesCtrCounterExtendedStorage); NON_MOVEABLE(AesCtrCounterExtendedStorage);

View file

@ -20,6 +20,7 @@
namespace ams::fssystem { namespace ams::fssystem {
/* ACCURATE_TO_VERSION: Unknown */
template<typename BasePointer> template<typename BasePointer>
class AesCtrStorage : public ::ams::fs::IStorage, public ::ams::fs::impl::Newable { class AesCtrStorage : public ::ams::fs::IStorage, public ::ams::fs::impl::Newable {
NON_COPYABLE(AesCtrStorage); NON_COPYABLE(AesCtrStorage);

View file

@ -21,6 +21,7 @@
namespace ams::fssystem { namespace ams::fssystem {
/* ACCURATE_TO_VERSION: Unknown */
template<typename BasePointer> template<typename BasePointer>
class AesXtsStorage : public ::ams::fs::IStorage, public ::ams::fs::impl::Newable { class AesXtsStorage : public ::ams::fs::IStorage, public ::ams::fs::impl::Newable {
NON_COPYABLE(AesXtsStorage); NON_COPYABLE(AesXtsStorage);

View file

@ -22,6 +22,7 @@
namespace ams::fssystem { namespace ams::fssystem {
/* ACCURATE_TO_VERSION: Unknown */
template<size_t _DataAlign, size_t _BufferAlign> template<size_t _DataAlign, size_t _BufferAlign>
class AlignmentMatchingStorage : public ::ams::fs::IStorage, public ::ams::fs::impl::Newable { class AlignmentMatchingStorage : public ::ams::fs::IStorage, public ::ams::fs::impl::Newable {
NON_COPYABLE(AlignmentMatchingStorage); NON_COPYABLE(AlignmentMatchingStorage);
@ -131,6 +132,7 @@ namespace ams::fssystem {
} }
}; };
/* ACCURATE_TO_VERSION: Unknown */
template<typename BaseStorageType, size_t _BufferAlign> template<typename BaseStorageType, size_t _BufferAlign>
class AlignmentMatchingStoragePooledBuffer : public ::ams::fs::IStorage, public ::ams::fs::impl::Newable { class AlignmentMatchingStoragePooledBuffer : public ::ams::fs::IStorage, public ::ams::fs::impl::Newable {
NON_COPYABLE(AlignmentMatchingStoragePooledBuffer); NON_COPYABLE(AlignmentMatchingStoragePooledBuffer);
@ -232,6 +234,7 @@ namespace ams::fssystem {
} }
}; };
/* ACCURATE_TO_VERSION: Unknown */
template<size_t _BufferAlign> template<size_t _BufferAlign>
class AlignmentMatchingStorageInBulkRead : public ::ams::fs::IStorage, public ::ams::fs::impl::Newable { class AlignmentMatchingStorageInBulkRead : public ::ams::fs::IStorage, public ::ams::fs::impl::Newable {
NON_COPYABLE(AlignmentMatchingStorageInBulkRead); NON_COPYABLE(AlignmentMatchingStorageInBulkRead);

View file

@ -19,6 +19,7 @@
namespace ams::fssystem { namespace ams::fssystem {
/* ACCURATE_TO_VERSION: Unknown */
class AlignmentMatchingStorageImpl { class AlignmentMatchingStorageImpl {
public: public:
static Result Read(fs::IStorage *base_storage, char *work_buf, size_t work_buf_size, size_t data_alignment, size_t buffer_alignment, s64 offset, char *buffer, size_t size); static Result Read(fs::IStorage *base_storage, char *work_buf, size_t work_buf_size, size_t data_alignment, size_t buffer_alignment, s64 offset, char *buffer, size_t size);

View file

@ -26,6 +26,7 @@ namespace ams::fs::impl {
namespace ams::fssystem { namespace ams::fssystem {
/* ACCURATE_TO_VERSION: Unknown */
using AllocateFunction = void *(*)(size_t size); using AllocateFunction = void *(*)(size_t size);
using DeallocateFunction = void (*)(void *ptr, size_t size); using DeallocateFunction = void (*)(void *ptr, size_t size);

View file

@ -18,6 +18,7 @@
namespace ams::fssystem { namespace ams::fssystem {
/* ACCURATE_TO_VERSION: 13.4.0.0 */
class IAsynchronousAccessSplitter { class IAsynchronousAccessSplitter {
public: public:
static IAsynchronousAccessSplitter *GetDefaultAsynchronousAccessSplitter(); static IAsynchronousAccessSplitter *GetDefaultAsynchronousAccessSplitter();
@ -31,6 +32,7 @@ namespace ams::fssystem {
virtual Result QueryInvocationCount(s64 *out, s64 start_offset, s64 end_offset, s64 access_size, s64 alignment_size) { AMS_UNUSED(out, start_offset, end_offset, access_size, alignment_size); AMS_ABORT("TODO"); } virtual Result QueryInvocationCount(s64 *out, s64 start_offset, s64 end_offset, s64 access_size, s64 alignment_size) { AMS_UNUSED(out, start_offset, end_offset, access_size, alignment_size); AMS_ABORT("TODO"); }
}; };
/* ACCURATE_TO_VERSION: 13.4.0.0 */
class DefaultAsynchronousAccessSplitter final : public IAsynchronousAccessSplitter { class DefaultAsynchronousAccessSplitter final : public IAsynchronousAccessSplitter {
public: public:
constexpr DefaultAsynchronousAccessSplitter() = default; constexpr DefaultAsynchronousAccessSplitter() = default;
@ -48,6 +50,7 @@ namespace ams::fssystem {
} }
}; };
/* ACCURATE_TO_VERSION: 13.4.0.0 */
inline IAsynchronousAccessSplitter *IAsynchronousAccessSplitter::GetDefaultAsynchronousAccessSplitter() { inline IAsynchronousAccessSplitter *IAsynchronousAccessSplitter::GetDefaultAsynchronousAccessSplitter() {
static constinit DefaultAsynchronousAccessSplitter s_default_access_splitter; static constinit DefaultAsynchronousAccessSplitter s_default_access_splitter;
return std::addressof(s_default_access_splitter); return std::addressof(s_default_access_splitter);

View file

@ -18,6 +18,8 @@
namespace ams::fssystem { namespace ams::fssystem {
/* ACCURATE_TO_VERSION: 13.4.0.0 */
constexpr inline s32 CountLeadingZeros(u32 val) { constexpr inline s32 CountLeadingZeros(u32 val) {
return util::CountLeadingZeros(val); return util::CountLeadingZeros(val);
} }

View file

@ -34,6 +34,7 @@ namespace ams::fssystem {
}; };
static_assert(util::is_pod<FileSystemBufferManagerSet>::value); static_assert(util::is_pod<FileSystemBufferManagerSet>::value);
/* ACCURATE_TO_VERSION: 13.4.0.0 */
class BlockCacheBufferedStorage : public ::ams::fs::IStorage { class BlockCacheBufferedStorage : public ::ams::fs::IStorage {
NON_COPYABLE(BlockCacheBufferedStorage); NON_COPYABLE(BlockCacheBufferedStorage);
NON_MOVEABLE(BlockCacheBufferedStorage); NON_MOVEABLE(BlockCacheBufferedStorage);

Some files were not shown because too many files have changed in this diff Show more