Stub ngword and ngword2

Co-Authored-By: Timotej Leginus <35149140+timleg002@users.noreply.github.com>
This commit is contained in:
lynxnb 2022-10-16 21:54:53 +02:00 committed by Billy Laws
parent a7be4fd1e1
commit cdb2b85d6c
4 changed files with 27 additions and 0 deletions

Binary file not shown.

Binary file not shown.

View File

@ -69,6 +69,17 @@ namespace skyline::service::fssrv {
return {}; return {};
} }
Result IFileSystemProxy::OpenDataStorageByDataId(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
auto storageId{request.Pop<StorageId>()};
request.Skip<std::array<u8, 7>>(); // 7-bytes padding
auto titleId{request.Pop<u64>()};
auto romFs{std::make_shared<IStorage>(state.os->assetFileSystem->OpenFile(fmt::format("romfs/{:016X}", titleId)), state, manager)};
manager.RegisterService(romFs, session, response);
return {};
}
Result IFileSystemProxy::GetGlobalAccessLogMode(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) { Result IFileSystemProxy::GetGlobalAccessLogMode(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
response.Push<u32>(0); response.Push<u32>(0);
return {}; return {};

View File

@ -42,6 +42,15 @@ namespace skyline::service::fssrv {
}; };
static_assert(sizeof(SaveDataAttribute) == 0x40); static_assert(sizeof(SaveDataAttribute) == 0x40);
enum class StorageId : u8 {
None = 0,
Host = 1,
GameCard = 2,
NandSystem = 3,
NandUser = 4,
SdCard = 5,
};
/** /**
* @brief IFileSystemProxy or fsp-srv is responsible for providing handles to file systems * @brief IFileSystemProxy or fsp-srv is responsible for providing handles to file systems
* @url https://switchbrew.org/wiki/Filesystem_services#fsp-srv * @url https://switchbrew.org/wiki/Filesystem_services#fsp-srv
@ -77,6 +86,12 @@ namespace skyline::service::fssrv {
*/ */
Result OpenDataStorageByCurrentProcess(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); Result OpenDataStorageByCurrentProcess(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
/**
* @brief Returns a handle to an instance of #IStorage
* @url https://switchbrew.org/wiki/Filesystem_services#OpenDataStorageByDataId
*/
Result OpenDataStorageByDataId(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
/** /**
* @brief Returns the filesystem log access mode * @brief Returns the filesystem log access mode
* @url https://switchbrew.org/wiki/Filesystem_services#GetGlobalAccessLogMode * @url https://switchbrew.org/wiki/Filesystem_services#GetGlobalAccessLogMode
@ -88,6 +103,7 @@ namespace skyline::service::fssrv {
SFUNC(0x12, IFileSystemProxy, OpenSdCardFileSystem), SFUNC(0x12, IFileSystemProxy, OpenSdCardFileSystem),
SFUNC(0x33, IFileSystemProxy, OpenSaveDataFileSystem), SFUNC(0x33, IFileSystemProxy, OpenSaveDataFileSystem),
SFUNC(0xC8, IFileSystemProxy, OpenDataStorageByCurrentProcess), SFUNC(0xC8, IFileSystemProxy, OpenDataStorageByCurrentProcess),
SFUNC(0xCA, IFileSystemProxy, OpenDataStorageByDataId),
SFUNC(0x3ED, IFileSystemProxy, GetGlobalAccessLogMode) SFUNC(0x3ED, IFileSystemProxy, GetGlobalAccessLogMode)
) )
}; };