mirror of
https://github.com/Thealexbarney/LibHac.git
synced 2025-02-09 13:14:46 +01:00
Rename FsSrv.Sf file system and storage interfaces
This commit is contained in:
parent
0efaafd101
commit
57c0a5065c
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using LibHac.Common;
|
||||
using LibHac.Fs.Fsa;
|
||||
using LibHac.FsSrv.Sf;
|
||||
using IFileSystemSf = LibHac.FsSrv.Sf.IFileSystem;
|
||||
|
||||
namespace LibHac.Fs.Accessors
|
||||
{
|
||||
|
@ -9,6 +9,7 @@ using LibHac.FsSrv;
|
||||
using LibHac.FsSrv.Sf;
|
||||
using LibHac.FsSystem;
|
||||
using LibHac.Util;
|
||||
using IFileSystem = LibHac.Fs.Fsa.IFileSystem;
|
||||
|
||||
namespace LibHac.Fs
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
using LibHac.FsSrv.Sf;
|
||||
using IFileSystemSf = LibHac.FsSrv.Sf.IFileSystem;
|
||||
|
||||
namespace LibHac.Fs.Fsa
|
||||
{
|
||||
|
@ -1,7 +1,8 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using LibHac.Fs.Fsa;
|
||||
using LibHac.FsSrv.Sf;
|
||||
using LibHac.Sf;
|
||||
using IDirectory = LibHac.Fs.Fsa.IDirectory;
|
||||
using IDirectorySf = LibHac.FsSrv.Sf.IDirectory;
|
||||
|
||||
namespace LibHac.Fs.Impl
|
||||
{
|
||||
@ -21,7 +22,7 @@ namespace LibHac.Fs.Impl
|
||||
protected override Result DoRead(out long entriesRead, Span<DirectoryEntry> entryBuffer)
|
||||
{
|
||||
Span<byte> buffer = MemoryMarshal.Cast<DirectoryEntry, byte>(entryBuffer);
|
||||
return BaseDirectory.Target.Read(out entriesRead, buffer);
|
||||
return BaseDirectory.Target.Read(out entriesRead, new OutBuffer(buffer));
|
||||
}
|
||||
|
||||
protected override Result DoGetEntryCount(out long entryCount)
|
||||
|
@ -1,8 +1,8 @@
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using LibHac.Common;
|
||||
using LibHac.Fs.Fsa;
|
||||
using LibHac.FsSrv.Sf;
|
||||
using IFile = LibHac.Fs.Fsa.IFile;
|
||||
using IFileSf = LibHac.FsSrv.Sf.IFile;
|
||||
|
||||
namespace LibHac.Fs.Impl
|
||||
{
|
||||
|
@ -4,14 +4,17 @@ using LibHac.Common;
|
||||
using LibHac.Fs.Fsa;
|
||||
using LibHac.FsSrv.Sf;
|
||||
using LibHac.Util;
|
||||
using IFileSystemSf = LibHac.FsSrv.Sf.IFileSystem;
|
||||
using IFileSf = LibHac.FsSrv.Sf.IFile;
|
||||
using IDirectorySf = LibHac.FsSrv.Sf.IDirectory;
|
||||
|
||||
namespace LibHac.Fs.Impl
|
||||
{
|
||||
/// <summary>
|
||||
/// An adapter for using an <see cref="IFileSystemSf"/> service object as an <see cref="IFileSystem"/>. Used
|
||||
/// when receiving a Horizon IPC file system object so it can be used as an <see cref="IFileSystem"/> locally.
|
||||
/// An adapter for using an <see cref="IFileSystemSf"/> service object as an <see cref="Fsa.IFileSystem"/>. Used
|
||||
/// when receiving a Horizon IPC file system object so it can be used as an <see cref="Fsa.IFileSystem"/> locally.
|
||||
/// </summary>
|
||||
internal class FileSystemServiceObjectAdapter : IFileSystem, IMultiCommitTarget
|
||||
internal class FileSystemServiceObjectAdapter : Fsa.IFileSystem, IMultiCommitTarget
|
||||
{
|
||||
private ReferenceCountedDisposable<IFileSystemSf> BaseFs { get; }
|
||||
|
||||
@ -122,7 +125,7 @@ namespace LibHac.Fs.Impl
|
||||
return BaseFs.Target.GetTotalSpaceSize(out totalSpace, in sfPath);
|
||||
}
|
||||
|
||||
protected override Result DoOpenFile(out IFile file, U8Span path, OpenMode mode)
|
||||
protected override Result DoOpenFile(out Fsa.IFile file, U8Span path, OpenMode mode)
|
||||
{
|
||||
file = default;
|
||||
|
||||
@ -144,7 +147,7 @@ namespace LibHac.Fs.Impl
|
||||
}
|
||||
}
|
||||
|
||||
protected override Result DoOpenDirectory(out IDirectory directory, U8Span path, OpenDirectoryMode mode)
|
||||
protected override Result DoOpenDirectory(out Fsa.IDirectory directory, U8Span path, OpenDirectoryMode mode)
|
||||
{
|
||||
directory = default;
|
||||
|
||||
@ -181,7 +184,8 @@ namespace LibHac.Fs.Impl
|
||||
return BaseFs.Target.GetFileTimeStampRaw(out timeStamp, in sfPath);
|
||||
}
|
||||
|
||||
protected override Result DoQueryEntry(Span<byte> outBuffer, ReadOnlySpan<byte> inBuffer, QueryId queryId, U8Span path)
|
||||
protected override Result DoQueryEntry(Span<byte> outBuffer, ReadOnlySpan<byte> inBuffer, QueryId queryId,
|
||||
U8Span path)
|
||||
{
|
||||
Result rc = GetPathForServiceObject(out Path sfPath, path);
|
||||
if (rc.IsFailure()) return rc;
|
||||
|
@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using LibHac.Common;
|
||||
using LibHac.FsSrv.Sf;
|
||||
using IStorageSf = LibHac.FsSrv.Sf.IStorage;
|
||||
|
||||
namespace LibHac.Fs.Impl
|
||||
{
|
||||
|
@ -3,6 +3,7 @@ using LibHac.Common;
|
||||
using LibHac.Fs.Impl;
|
||||
using LibHac.FsSrv;
|
||||
using LibHac.FsSrv.Sf;
|
||||
using IFileSystemSf = LibHac.FsSrv.Sf.IFileSystem;
|
||||
|
||||
namespace LibHac.Fs.Shim
|
||||
{
|
||||
|
@ -2,7 +2,7 @@
|
||||
using LibHac.Common;
|
||||
using LibHac.Fs.Impl;
|
||||
using LibHac.FsSrv;
|
||||
using LibHac.FsSrv.Sf;
|
||||
using IFileSystemSf = LibHac.FsSrv.Sf.IFileSystem;
|
||||
|
||||
namespace LibHac.Fs.Shim
|
||||
{
|
||||
|
@ -8,6 +8,8 @@ using LibHac.FsSrv.Sf;
|
||||
using LibHac.FsSystem;
|
||||
using LibHac.Util;
|
||||
using static LibHac.Fs.CommonPaths;
|
||||
using IFileSystemSf = LibHac.FsSrv.Sf.IFileSystem;
|
||||
using IStorageSf = LibHac.FsSrv.Sf.IStorage;
|
||||
|
||||
namespace LibHac.Fs.Shim
|
||||
{
|
||||
@ -82,7 +84,8 @@ namespace LibHac.Fs.Shim
|
||||
}
|
||||
|
||||
// ReSharper disable once UnusedParameter.Local
|
||||
private static Result MountBisImpl(FileSystemClient fs, U8Span mountName, BisPartitionId partitionId, U8Span rootPath)
|
||||
private static Result MountBisImpl(FileSystemClient fs, U8Span mountName, BisPartitionId partitionId,
|
||||
U8Span rootPath)
|
||||
{
|
||||
Result rc = MountHelpers.CheckMountNameAcceptingReservedMountName(mountName);
|
||||
if (rc.IsFailure()) return rc;
|
||||
@ -166,7 +169,8 @@ namespace LibHac.Fs.Shim
|
||||
return fsProxy.SetBisRootForHost(partitionId, in sfPath);
|
||||
}
|
||||
|
||||
public static Result OpenBisPartition(this FileSystemClient fs, out IStorage partitionStorage, BisPartitionId partitionId)
|
||||
public static Result OpenBisPartition(this FileSystemClient fs, out IStorage partitionStorage,
|
||||
BisPartitionId partitionId)
|
||||
{
|
||||
partitionStorage = default;
|
||||
|
||||
|
@ -4,6 +4,7 @@ using LibHac.Common;
|
||||
using LibHac.Fs.Impl;
|
||||
using LibHac.FsSrv.Sf;
|
||||
using LibHac.Ncm;
|
||||
using IFileSystemSf = LibHac.FsSrv.Sf.IFileSystem;
|
||||
|
||||
namespace LibHac.Fs.Shim
|
||||
{
|
||||
|
@ -4,6 +4,7 @@ using LibHac.Fs.Impl;
|
||||
using LibHac.FsSrv;
|
||||
using LibHac.FsSrv.Sf;
|
||||
using LibHac.Ncm;
|
||||
using IFileSystemSf = LibHac.FsSrv.Sf.IFileSystem;
|
||||
|
||||
namespace LibHac.Fs.Shim
|
||||
{
|
||||
|
@ -2,8 +2,8 @@
|
||||
using LibHac.Common;
|
||||
using LibHac.Fs.Impl;
|
||||
using LibHac.FsSrv;
|
||||
using LibHac.FsSrv.Sf;
|
||||
using LibHac.Util;
|
||||
using IFileSystemSf = LibHac.FsSrv.Sf.IFileSystem;
|
||||
|
||||
namespace LibHac.Fs.Shim
|
||||
{
|
||||
|
@ -2,7 +2,7 @@
|
||||
using LibHac.Common;
|
||||
using LibHac.Fs.Impl;
|
||||
using LibHac.FsSrv;
|
||||
using LibHac.FsSrv.Sf;
|
||||
using IFileSystemSf = LibHac.FsSrv.Sf.IFileSystem;
|
||||
|
||||
namespace LibHac.Fs.Shim
|
||||
{
|
||||
|
@ -3,6 +3,8 @@ using LibHac.Common;
|
||||
using LibHac.Fs.Impl;
|
||||
using LibHac.FsSrv;
|
||||
using LibHac.FsSrv.Sf;
|
||||
using IFileSystemSf = LibHac.FsSrv.Sf.IFileSystem;
|
||||
using IStorageSf = LibHac.FsSrv.Sf.IStorage;
|
||||
|
||||
namespace LibHac.Fs.Shim
|
||||
{
|
||||
|
@ -2,13 +2,14 @@
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.CompilerServices;
|
||||
using LibHac.Common;
|
||||
using LibHac.Fs.Fsa;
|
||||
using LibHac.Fs.Impl;
|
||||
using LibHac.FsSrv;
|
||||
using LibHac.FsSrv.Sf;
|
||||
using LibHac.FsSystem;
|
||||
using LibHac.Util;
|
||||
using static LibHac.Fs.CommonPaths;
|
||||
using IFileSystem = LibHac.Fs.Fsa.IFileSystem;
|
||||
using IFileSystemSf = LibHac.FsSrv.Sf.IFileSystem;
|
||||
|
||||
namespace LibHac.Fs.Shim
|
||||
{
|
||||
|
@ -2,6 +2,7 @@
|
||||
using LibHac.FsSrv;
|
||||
using LibHac.FsSrv.Sf;
|
||||
using LibHac.Ncm;
|
||||
using LibHac.Sf;
|
||||
|
||||
namespace LibHac.Fs.Shim
|
||||
{
|
||||
@ -16,8 +17,8 @@ namespace LibHac.Fs.Shim
|
||||
Result rc = registry.SetCurrentProcess(fs.Hos.ProcessId.Value);
|
||||
if (rc.IsFailure()) return rc;
|
||||
|
||||
return registry.RegisterProgram(processId, programId, storageId, accessControlData,
|
||||
accessControlDescriptor);
|
||||
return registry.RegisterProgram(processId, programId, storageId, new InBuffer(accessControlData),
|
||||
new InBuffer(accessControlDescriptor));
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="ProgramRegistryImpl.UnregisterProgram"/>
|
||||
|
@ -2,8 +2,8 @@
|
||||
using LibHac.Common;
|
||||
using LibHac.Fs.Impl;
|
||||
using LibHac.FsSrv;
|
||||
using LibHac.FsSrv.Sf;
|
||||
using LibHac.Ncm;
|
||||
using IFileSystemSf = LibHac.FsSrv.Sf.IFileSystem;
|
||||
|
||||
namespace LibHac.Fs.Shim
|
||||
{
|
||||
|
@ -3,6 +3,7 @@ using LibHac.Common;
|
||||
using LibHac.Fs.Impl;
|
||||
using LibHac.FsSrv;
|
||||
using LibHac.FsSrv.Sf;
|
||||
using IFileSystemSf = LibHac.FsSrv.Sf.IFileSystem;
|
||||
|
||||
namespace LibHac.Fs.Shim
|
||||
{
|
||||
|
@ -1,8 +1,8 @@
|
||||
using LibHac.Common;
|
||||
using LibHac.Fs.Impl;
|
||||
using LibHac.FsSrv;
|
||||
using LibHac.FsSrv.Sf;
|
||||
using LibHac.Ncm;
|
||||
using IFileSystemSf = LibHac.FsSrv.Sf.IFileSystem;
|
||||
|
||||
namespace LibHac.Fs.Shim
|
||||
{
|
||||
|
@ -2,6 +2,7 @@
|
||||
using LibHac.Common;
|
||||
using LibHac.Fs.Accessors;
|
||||
using LibHac.FsSrv.Sf;
|
||||
using IFileSystemSf = LibHac.FsSrv.Sf.IFileSystem;
|
||||
|
||||
namespace LibHac.Fs.Shim
|
||||
{
|
||||
|
@ -1,8 +1,9 @@
|
||||
using LibHac.Fs;
|
||||
using LibHac.Fs.Fsa;
|
||||
using LibHac.FsSrv.Impl;
|
||||
using LibHac.FsSrv.Sf;
|
||||
using LibHac.Sf;
|
||||
using IFileSystem = LibHac.Fs.Fsa.IFileSystem;
|
||||
using IFileSystemSf = LibHac.FsSrv.Sf.IFileSystem;
|
||||
|
||||
namespace LibHac.FsSrv
|
||||
{
|
||||
|
@ -1,11 +1,11 @@
|
||||
using System;
|
||||
using LibHac.Common;
|
||||
using LibHac.Fs;
|
||||
using LibHac.Fs.Fsa;
|
||||
using LibHac.FsSrv.Creators;
|
||||
using LibHac.FsSrv.Impl;
|
||||
using LibHac.FsSrv.Sf;
|
||||
using LibHac.Sf;
|
||||
using IFileSystem = LibHac.Fs.Fsa.IFileSystem;
|
||||
|
||||
namespace LibHac.FsSrv
|
||||
{
|
||||
|
@ -5,6 +5,8 @@ using LibHac.FsSrv.Creators;
|
||||
using LibHac.FsSrv.Impl;
|
||||
using LibHac.FsSrv.Sf;
|
||||
using LibHac.FsSystem;
|
||||
using IStorage = LibHac.Fs.IStorage;
|
||||
using IStorageSf = LibHac.FsSrv.Sf.IStorage;
|
||||
|
||||
namespace LibHac.FsSrv
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
using LibHac.Common.Keys;
|
||||
using LibHac.Fs.Fsa;
|
||||
using LibHac.FsSrv.Creators;
|
||||
using LibHac.FsSrv.Sf;
|
||||
using IFileSystem = LibHac.Fs.Fsa.IFileSystem;
|
||||
|
||||
namespace LibHac.FsSrv
|
||||
{
|
||||
|
@ -2,13 +2,16 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
using LibHac.Common;
|
||||
using LibHac.Fs;
|
||||
using LibHac.Fs.Fsa;
|
||||
using LibHac.FsSrv.Impl;
|
||||
using LibHac.FsSrv.Sf;
|
||||
using LibHac.FsSystem;
|
||||
using LibHac.Ncm;
|
||||
using LibHac.Sf;
|
||||
using LibHac.Spl;
|
||||
using IFileSystem = LibHac.Fs.Fsa.IFileSystem;
|
||||
using IFileSystemSf = LibHac.FsSrv.Sf.IFileSystem;
|
||||
using IFileSf = LibHac.FsSrv.Sf.IFile;
|
||||
using IStorageSf = LibHac.FsSrv.Sf.IStorage;
|
||||
|
||||
namespace LibHac.FsSrv
|
||||
{
|
||||
|
@ -3,6 +3,9 @@ using LibHac.FsSrv.Sf;
|
||||
using LibHac.Ncm;
|
||||
using LibHac.Sf;
|
||||
using LibHac.Spl;
|
||||
using IFileSystemSf = LibHac.FsSrv.Sf.IFileSystem;
|
||||
using IFileSf = LibHac.FsSrv.Sf.IFile;
|
||||
using IStorageSf = LibHac.FsSrv.Sf.IStorage;
|
||||
|
||||
namespace LibHac.FsSrv
|
||||
{
|
||||
|
@ -1,8 +1,9 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using LibHac.Fs;
|
||||
using LibHac.Fs.Fsa;
|
||||
using LibHac.FsSrv.Sf;
|
||||
using LibHac.Sf;
|
||||
using IDirectory = LibHac.Fs.Fsa.IDirectory;
|
||||
using IDirectorySf = LibHac.FsSrv.Sf.IDirectory;
|
||||
|
||||
namespace LibHac.FsSrv.Impl
|
||||
{
|
||||
@ -19,12 +20,12 @@ namespace LibHac.FsSrv.Impl
|
||||
parentFileSystem = null;
|
||||
}
|
||||
|
||||
public Result Read(out long entriesRead, Span<byte> entryBuffer)
|
||||
public Result Read(out long entriesRead, OutBuffer entryBuffer)
|
||||
{
|
||||
const int maxTryCount = 2;
|
||||
entriesRead = default;
|
||||
|
||||
Span<DirectoryEntry> entries = MemoryMarshal.Cast<byte, DirectoryEntry>(entryBuffer);
|
||||
Span<DirectoryEntry> entries = MemoryMarshal.Cast<byte, DirectoryEntry>(entryBuffer.Buffer);
|
||||
|
||||
Result rc = Result.Success;
|
||||
long tmpEntriesRead = 0;
|
||||
|
@ -2,8 +2,8 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
using LibHac.Common;
|
||||
using LibHac.Fs;
|
||||
using LibHac.Fs.Fsa;
|
||||
using LibHac.FsSrv.Sf;
|
||||
using IFile = LibHac.Fs.Fsa.IFile;
|
||||
using IFileSf = LibHac.FsSrv.Sf.IFile;
|
||||
|
||||
namespace LibHac.FsSrv.Impl
|
||||
{
|
||||
|
@ -5,6 +5,10 @@ using LibHac.Fs;
|
||||
using LibHac.Fs.Fsa;
|
||||
using LibHac.FsSrv.Sf;
|
||||
using LibHac.Util;
|
||||
using IFileSystem = LibHac.Fs.Fsa.IFileSystem;
|
||||
using IFileSystemSf = LibHac.FsSrv.Sf.IFileSystem;
|
||||
using IFileSf = LibHac.FsSrv.Sf.IFile;
|
||||
using IDirectorySf = LibHac.FsSrv.Sf.IDirectory;
|
||||
|
||||
namespace LibHac.FsSrv.Impl
|
||||
{
|
||||
@ -178,7 +182,7 @@ namespace LibHac.FsSrv.Impl
|
||||
if (normalizer.Result.IsFailure()) return normalizer.Result;
|
||||
|
||||
Result rc = Result.Success;
|
||||
IFile fileInterface = null;
|
||||
Fs.Fsa.IFile fileInterface = null;
|
||||
|
||||
for (int tryNum = 0; tryNum < maxTryCount; tryNum++)
|
||||
{
|
||||
@ -207,7 +211,7 @@ namespace LibHac.FsSrv.Impl
|
||||
if (normalizer.Result.IsFailure()) return normalizer.Result;
|
||||
|
||||
Result rc = Result.Success;
|
||||
IDirectory dirInterface = null;
|
||||
Fs.Fsa.IDirectory dirInterface = null;
|
||||
|
||||
for (int tryNum = 0; tryNum < maxTryCount; tryNum++)
|
||||
{
|
||||
|
@ -1,8 +1,8 @@
|
||||
using System;
|
||||
using LibHac.Fs;
|
||||
using LibHac.Fs.Fsa;
|
||||
using LibHac.FsSrv.Sf;
|
||||
using LibHac.Util;
|
||||
using IFileSf = LibHac.FsSrv.Sf.IFile;
|
||||
|
||||
namespace LibHac.FsSrv.Impl
|
||||
{
|
||||
|
@ -8,6 +8,9 @@ using LibHac.Fs.Fsa;
|
||||
using LibHac.Fs.Shim;
|
||||
using LibHac.FsSrv.Sf;
|
||||
using LibHac.Sf;
|
||||
using IFileSystem = LibHac.Fs.Fsa.IFileSystem;
|
||||
using IFile = LibHac.Fs.Fsa.IFile;
|
||||
using IFileSystemSf = LibHac.FsSrv.Sf.IFileSystem;
|
||||
|
||||
namespace LibHac.FsSrv.Impl
|
||||
{
|
||||
|
@ -2,7 +2,7 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
using LibHac.Common;
|
||||
using LibHac.Fs;
|
||||
using LibHac.FsSrv.Sf;
|
||||
using IStorageSf = LibHac.FsSrv.Sf.IStorage;
|
||||
|
||||
namespace LibHac.FsSrv.Impl
|
||||
{
|
||||
|
@ -3,7 +3,6 @@ using System.Runtime.CompilerServices;
|
||||
using LibHac.Common;
|
||||
using LibHac.Diag;
|
||||
using LibHac.Fs;
|
||||
using LibHac.Fs.Fsa;
|
||||
using LibHac.FsSrv.Impl;
|
||||
using LibHac.FsSrv.Sf;
|
||||
using LibHac.FsSystem;
|
||||
@ -11,6 +10,10 @@ using LibHac.Lr;
|
||||
using LibHac.Ncm;
|
||||
using LibHac.Spl;
|
||||
using LibHac.Util;
|
||||
using IFileSystem = LibHac.Fs.Fsa.IFileSystem;
|
||||
using IStorage = LibHac.Fs.IStorage;
|
||||
using IFileSystemSf = LibHac.FsSrv.Sf.IFileSystem;
|
||||
using IStorageSf = LibHac.FsSrv.Sf.IStorage;
|
||||
using Path = LibHac.Lr.Path;
|
||||
|
||||
namespace LibHac.FsSrv
|
||||
|
@ -1,8 +1,8 @@
|
||||
using System;
|
||||
using LibHac.Fs;
|
||||
using LibHac.Fs;
|
||||
using LibHac.FsSrv.Impl;
|
||||
using LibHac.FsSrv.Sf;
|
||||
using LibHac.Ncm;
|
||||
using LibHac.Sf;
|
||||
|
||||
namespace LibHac.FsSrv
|
||||
{
|
||||
@ -38,13 +38,13 @@ namespace LibHac.FsSrv
|
||||
/// <see cref="ResultFs.PermissionDenied"/>: Insufficient permissions.</returns>
|
||||
/// <inheritdoc cref="ProgramRegistryManager.RegisterProgram"/>
|
||||
public Result RegisterProgram(ulong processId, ProgramId programId, StorageId storageId,
|
||||
ReadOnlySpan<byte> accessControlData, ReadOnlySpan<byte> accessControlDescriptor)
|
||||
InBuffer accessControlData, InBuffer accessControlDescriptor)
|
||||
{
|
||||
if (!ProgramInfo.IsInitialProgram(_processId))
|
||||
return ResultFs.PermissionDenied.Log();
|
||||
|
||||
return _registryService.RegisterProgramInfo(processId, programId, storageId, accessControlData,
|
||||
accessControlDescriptor);
|
||||
return _registryService.RegisterProgramInfo(processId, programId, storageId, accessControlData.Buffer,
|
||||
accessControlDescriptor.Buffer);
|
||||
}
|
||||
|
||||
/// <returns><see cref="Result.Success"/>: The operation was successful.<br/>
|
||||
|
@ -3,7 +3,6 @@ using System.Runtime.CompilerServices;
|
||||
using LibHac.Common;
|
||||
using LibHac.Diag;
|
||||
using LibHac.Fs;
|
||||
using LibHac.Fs.Fsa;
|
||||
using LibHac.FsSrv.Impl;
|
||||
using LibHac.FsSrv.Sf;
|
||||
using LibHac.FsSystem;
|
||||
@ -11,6 +10,10 @@ using LibHac.Kvdb;
|
||||
using LibHac.Ncm;
|
||||
using LibHac.Sf;
|
||||
using LibHac.Util;
|
||||
using IFileSystem = LibHac.Fs.Fsa.IFileSystem;
|
||||
using IFileSystemSf = LibHac.FsSrv.Sf.IFileSystem;
|
||||
using IFile = LibHac.Fs.Fsa.IFile;
|
||||
using IFileSf = LibHac.FsSrv.Sf.IFile;
|
||||
using Utility = LibHac.FsSystem.Utility;
|
||||
|
||||
namespace LibHac.FsSrv
|
||||
|
@ -1,10 +1,11 @@
|
||||
using System;
|
||||
using LibHac.Sf;
|
||||
|
||||
namespace LibHac.FsSrv.Sf
|
||||
{
|
||||
public interface IDirectorySf : IDisposable
|
||||
public interface IDirectory : IDisposable
|
||||
{
|
||||
Result Read(out long entriesRead, Span<byte> entryBuffer);
|
||||
Result Read(out long entriesRead, OutBuffer entryBuffer);
|
||||
Result GetEntryCount(out long entryCount);
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,7 @@ using LibHac.Fs;
|
||||
|
||||
namespace LibHac.FsSrv.Sf
|
||||
{
|
||||
public interface IFileSf : IDisposable
|
||||
public interface IFile : IDisposable
|
||||
{
|
||||
Result Read(out long bytesRead, long offset, Span<byte> destination, ReadOption option);
|
||||
Result Write(long offset, ReadOnlySpan<byte> source, WriteOption option);
|
||||
|
@ -1,12 +1,13 @@
|
||||
using System;
|
||||
using LibHac.Fs;
|
||||
using LibHac.Fs.Fsa;
|
||||
using IFileSf = LibHac.FsSrv.Sf.IFile;
|
||||
using IDirectorySf = LibHac.FsSrv.Sf.IDirectory;
|
||||
|
||||
namespace LibHac.FsSrv.Sf
|
||||
{
|
||||
public interface IFileSystemSf : IDisposable
|
||||
public interface IFileSystem : IDisposable
|
||||
{
|
||||
Result GetImpl(out ReferenceCountedDisposable<IFileSystem> fileSystem);
|
||||
Result GetImpl(out ReferenceCountedDisposable<Fs.Fsa.IFileSystem> fileSystem);
|
||||
Result CreateFile(in Path path, long size, int option);
|
||||
Result DeleteFile(in Path path);
|
||||
Result CreateDirectory(in Path path);
|
||||
|
@ -1,5 +1,6 @@
|
||||
using LibHac.Fs;
|
||||
using LibHac.Ncm;
|
||||
using IFileSystemSf = LibHac.FsSrv.Sf.IFileSystem;
|
||||
|
||||
namespace LibHac.FsSrv.Sf
|
||||
{
|
||||
|
@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using IFileSystemSf = LibHac.FsSrv.Sf.IFileSystem;
|
||||
|
||||
namespace LibHac.FsSrv.Sf
|
||||
{
|
||||
|
@ -1,12 +1,12 @@
|
||||
using System;
|
||||
using LibHac.Ncm;
|
||||
using LibHac.Ncm;
|
||||
using LibHac.Sf;
|
||||
|
||||
namespace LibHac.FsSrv.Sf
|
||||
{
|
||||
public interface IProgramRegistry
|
||||
{
|
||||
Result RegisterProgram(ulong processId, ProgramId programId, StorageId storageId,
|
||||
ReadOnlySpan<byte> accessControlData, ReadOnlySpan<byte> accessControlDescriptor);
|
||||
InBuffer accessControlData, InBuffer accessControlDescriptor);
|
||||
|
||||
Result UnregisterProgram(ulong processId);
|
||||
Result SetCurrentProcess(ulong processId);
|
||||
|
@ -3,7 +3,7 @@ using LibHac.Fs;
|
||||
|
||||
namespace LibHac.FsSrv.Sf
|
||||
{
|
||||
public interface IStorageSf : IDisposable
|
||||
public interface IStorage : IDisposable
|
||||
{
|
||||
Result Read(long offset, Span<byte> destination);
|
||||
Result Write(long offset, ReadOnlySpan<byte> source);
|
||||
|
@ -1,6 +1,6 @@
|
||||
using System;
|
||||
using LibHac.Fs;
|
||||
using LibHac.FsSrv.Sf;
|
||||
using IStorage = LibHac.Fs.IStorage;
|
||||
|
||||
namespace LibHac.FsSrv.Storage.Sf
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user