Add OpenMultiCommitManager to IFileSystemProxy

This commit is contained in:
Alex Barney 2020-03-21 23:55:23 -07:00
parent 0ab96f67bf
commit 8ead72ed84
3 changed files with 12 additions and 5 deletions

View file

@ -1176,6 +1176,12 @@ namespace LibHac.FsService
return Result.Success;
}
public Result OpenMultiCommitManager(out IMultiCommitManager commitManager)
{
commitManager = new MultiCommitManager(this);
return Result.Success;
}
internal Result OpenMultiCommitContextSaveData(out IFileSystem fileSystem)
{
fileSystem = default;

View file

@ -100,5 +100,6 @@ namespace LibHac.FsService
Result GetProgramIndexForAccessLog(out int programIndex, out int programCount);
Result OverrideSaveDataTransferTokenSignVerificationKey(ReadOnlySpan<byte> key);
Result CorruptSaveDataFileSystemByOffset(SaveDataSpaceId spaceId, ulong saveDataId, long offset);
Result OpenMultiCommitManager(out IMultiCommitManager commitManager);
}
}

View file

@ -142,13 +142,13 @@ namespace LibHac.FsService.Impl
return rc;
}
[StructLayout(LayoutKind.Sequential, Size = 0x18)]
[StructLayout(LayoutKind.Explicit, Size = 0x18)]
private struct CommitContext
{
public int Version;
public CommitState State;
public int FileSystemCount;
public long CommitCount; // I think?
[FieldOffset(0x00)] public int Version;
[FieldOffset(0x04)] public CommitState State;
[FieldOffset(0x08)] public int FileSystemCount;
[FieldOffset(0x10)] public long CommitCount; // I think?
}
private enum CommitState