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:
@@ -35,11 +35,18 @@ namespace Aaru.Filesystems;
|
||||
/// <summary>Implements detection for the Plan-9 Fossil on-disk filesystem</summary>
|
||||
public sealed partial class Fossil : IFilesystem
|
||||
{
|
||||
const string MODULE_NAME = "Fossil plugin";
|
||||
|
||||
#region IFilesystem Members
|
||||
|
||||
/// <inheritdoc />
|
||||
public string Name => Localization.Fossil_Name;
|
||||
|
||||
/// <inheritdoc />
|
||||
public Guid Id => new("932BF104-43F6-494F-973C-45EF58A51DA9");
|
||||
|
||||
/// <inheritdoc />
|
||||
public string Author => Authors.NataliaPortillo;
|
||||
const string MODULE_NAME = "Fossil plugin";
|
||||
|
||||
#endregion
|
||||
}
|
||||
@@ -40,6 +40,8 @@ namespace Aaru.Filesystems;
|
||||
/// <summary>Implements detection for the Plan-9 Fossil on-disk filesystem</summary>
|
||||
public sealed partial class Fossil
|
||||
{
|
||||
#region IFilesystem Members
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool Identify(IMediaImage imagePlugin, Partition partition)
|
||||
{
|
||||
@@ -86,14 +88,14 @@ public sealed partial class Fossil
|
||||
var sb = new StringBuilder();
|
||||
|
||||
sb.AppendLine(Localization.Fossil_filesystem);
|
||||
sb.AppendFormat(Localization.Filesystem_version_0, hdr.version).AppendLine();
|
||||
sb.AppendFormat(Localization._0_bytes_per_block, hdr.blockSize).AppendLine();
|
||||
sb.AppendFormat(Localization.Filesystem_version_0, hdr.version).AppendLine();
|
||||
sb.AppendFormat(Localization._0_bytes_per_block, hdr.blockSize).AppendLine();
|
||||
sb.AppendFormat(Localization.Superblock_resides_in_block_0, hdr.super).AppendLine();
|
||||
sb.AppendFormat(Localization.Labels_resides_in_block_0, hdr.label).AppendLine();
|
||||
sb.AppendFormat(Localization.Data_starts_at_block_0, hdr.data).AppendLine();
|
||||
sb.AppendFormat(Localization.Volume_has_0_blocks, hdr.end).AppendLine();
|
||||
sb.AppendFormat(Localization.Labels_resides_in_block_0, hdr.label).AppendLine();
|
||||
sb.AppendFormat(Localization.Data_starts_at_block_0, hdr.data).AppendLine();
|
||||
sb.AppendFormat(Localization.Volume_has_0_blocks, hdr.end).AppendLine();
|
||||
|
||||
ulong sbLocation = (hdr.super * (hdr.blockSize / imagePlugin.Info.SectorSize)) + partition.Start;
|
||||
ulong sbLocation = hdr.super * (hdr.blockSize / imagePlugin.Info.SectorSize) + partition.Start;
|
||||
|
||||
metadata = new FileSystem
|
||||
{
|
||||
@@ -124,4 +126,6 @@ public sealed partial class Fossil
|
||||
|
||||
information = sb.ToString();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
@@ -34,6 +34,8 @@ namespace Aaru.Filesystems;
|
||||
/// <summary>Implements detection for the Plan-9 Fossil on-disk filesystem</summary>
|
||||
public sealed partial class Fossil
|
||||
{
|
||||
#region Nested type: Header
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
readonly struct Header
|
||||
{
|
||||
@@ -53,6 +55,10 @@ public sealed partial class Fossil
|
||||
public readonly uint end;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Nested type: SuperBlock
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
readonly struct SuperBlock
|
||||
{
|
||||
@@ -79,4 +85,6 @@ public sealed partial class Fossil
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
|
||||
public readonly byte[] name;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
Reference in New Issue
Block a user