[Aaru.Filesystems] Reformat and cleanup.

This commit is contained in:
2023-10-03 23:22:08 +01:00
parent 51f35c80d9
commit 7a608e0061
296 changed files with 21000 additions and 18286 deletions

View File

@@ -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
}

View File

@@ -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
}

View File

@@ -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
}