fs: add OutputAccessLogToSdCard

This commit is contained in:
Michael Scire 2020-06-29 19:43:16 -07:00
parent e36c7a760f
commit 1625fb6424
2 changed files with 8 additions and 0 deletions

View File

@ -366,6 +366,7 @@ Result fsDisableAutoSaveDataCreation(void);
Result fsSetGlobalAccessLogMode(u32 mode); Result fsSetGlobalAccessLogMode(u32 mode);
Result fsGetGlobalAccessLogMode(u32* out_mode); Result fsGetGlobalAccessLogMode(u32* out_mode);
Result fsOutputAccessLogToSdCard(const char *log, size_t size);
// Wrapper(s) for fsCreateSaveDataFileSystemBySystemSaveDataId. // Wrapper(s) for fsCreateSaveDataFileSystemBySystemSaveDataId.
Result fsCreate_SystemSaveDataWithOwner(FsSaveDataSpaceId save_data_space_id, u64 system_save_data_id, AccountUid uid, u64 owner_id, s64 size, s64 journal_size, u32 flags); Result fsCreate_SystemSaveDataWithOwner(FsSaveDataSpaceId save_data_space_id, u64 system_save_data_id, AccountUid uid, u64 owner_id, s64 size, s64 journal_size, u32 flags);

View File

@ -504,6 +504,13 @@ Result fsGetGlobalAccessLogMode(u32* out_mode) {
return _fsObjectDispatchOut(&g_fsSrv, 1005, *out_mode); return _fsObjectDispatchOut(&g_fsSrv, 1005, *out_mode);
} }
Result fsOutputAccessLogToSdCard(const char *log, size_t size) {
return _fsObjectDispatch(&g_fsSrv, 1006,
.buffer_attrs = { SfBufferAttr_HipcMapAlias | SfBufferAttr_In },
.buffers = { { log, size } },
);
}
// Wrapper(s) for fsCreateSaveDataFileSystemBySystemSaveDataId. // Wrapper(s) for fsCreateSaveDataFileSystemBySystemSaveDataId.
Result fsCreate_SystemSaveDataWithOwner(FsSaveDataSpaceId save_data_space_id, u64 system_save_data_id, AccountUid uid, u64 owner_id, s64 size, s64 journal_size, u32 flags) { Result fsCreate_SystemSaveDataWithOwner(FsSaveDataSpaceId save_data_space_id, u64 system_save_data_id, AccountUid uid, u64 owner_id, s64 size, s64 journal_size, u32 flags) {
FsSaveDataAttribute attr = { FsSaveDataAttribute attr = {