mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
[Aaru.Filesystems] Reformat and cleanup.
This commit is contained in:
@@ -41,6 +41,8 @@ namespace Aaru.Filesystems;
|
||||
/// <summary>Implements detection of the Professional File System</summary>
|
||||
public sealed partial class PFS
|
||||
{
|
||||
#region IFilesystem Members
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool Identify(IMediaImage imagePlugin, Partition partition)
|
||||
{
|
||||
@@ -52,7 +54,7 @@ public sealed partial class PFS
|
||||
if(errno != ErrorNumber.NoError)
|
||||
return false;
|
||||
|
||||
uint magic = BigEndianBitConverter.ToUInt32(sector, 0x00);
|
||||
var magic = BigEndianBitConverter.ToUInt32(sector, 0x00);
|
||||
|
||||
return magic is AFS_DISK or PFS2_DISK or PFS_DISK or MUAF_DISK or MUPFS_DISK;
|
||||
}
|
||||
@@ -113,8 +115,10 @@ public sealed partial class PFS
|
||||
rootBlock.creationtick)).AppendLine();
|
||||
|
||||
if(rootBlock.extension > 0)
|
||||
{
|
||||
sbInformation.AppendFormat(Localization.Root_block_extension_resides_at_block_0, rootBlock.extension).
|
||||
AppendLine();
|
||||
}
|
||||
|
||||
information = sbInformation.ToString();
|
||||
|
||||
@@ -126,4 +130,6 @@ public sealed partial class PFS
|
||||
metadata.ClusterSize = imagePlugin.Info.SectorSize;
|
||||
metadata.VolumeName = StringHandlers.PascalToString(rootBlock.diskname, encoding);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
@@ -37,10 +37,16 @@ namespace Aaru.Filesystems;
|
||||
/// <summary>Implements detection of the Professional File System</summary>
|
||||
public sealed partial class PFS : IFilesystem
|
||||
{
|
||||
#region IFilesystem Members
|
||||
|
||||
/// <inheritdoc />
|
||||
public string Name => Localization.PFS_Name;
|
||||
|
||||
/// <inheritdoc />
|
||||
public Guid Id => new("68DE769E-D957-406A-8AE4-3781CA8CDA77");
|
||||
|
||||
/// <inheritdoc />
|
||||
public string Author => Authors.NataliaPortillo;
|
||||
|
||||
#endregion
|
||||
}
|
||||
@@ -36,6 +36,8 @@ namespace Aaru.Filesystems;
|
||||
/// <summary>Implements detection of the Professional File System</summary>
|
||||
public sealed partial class PFS
|
||||
{
|
||||
#region Nested type: BootBlock
|
||||
|
||||
/// <summary>Boot block, first 2 sectors</summary>
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
readonly struct BootBlock
|
||||
@@ -46,6 +48,10 @@ public sealed partial class PFS
|
||||
public readonly byte[] bootCode;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Nested type: RootBlock
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
readonly struct RootBlock
|
||||
{
|
||||
@@ -91,4 +97,6 @@ public sealed partial class PFS
|
||||
/// <summary>Unused</summary>
|
||||
public readonly uint unused;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
Reference in New Issue
Block a user