// /*************************************************************************** // Aaru Data Preservation Suite // ---------------------------------------------------------------------------- // // Filename : Structs.cs // Author(s) : Natalia Portillo // // Component : Professional File System plugin. // // --[ License ] -------------------------------------------------------------- // // This library is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as // published by the Free Software Foundation; either version 2.1 of the // License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, but // WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, see . // // ---------------------------------------------------------------------------- // Copyright © 2011-2024 Natalia Portillo // ****************************************************************************/ // ReSharper disable UnusedType.Local using System.Runtime.InteropServices; namespace Aaru.Filesystems; /// /// Implements detection of the Professional File System public sealed partial class PFS { #region Nested type: BootBlock /// Boot block, first 2 sectors [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct BootBlock { /// "PFS\1" disk type public readonly uint diskType; /// Boot code, til completion public readonly byte[] bootCode; } #endregion #region Nested type: RootBlock [StructLayout(LayoutKind.Sequential, Pack = 1)] readonly struct RootBlock { /// Disk type public readonly uint diskType; /// Options public readonly uint options; /// Current datestamp public readonly uint datestamp; /// Volume creation day public readonly ushort creationday; /// Volume creation minute public readonly ushort creationminute; /// Volume creation tick public readonly ushort creationtick; /// AmigaDOS protection bits public readonly ushort protection; /// Volume label (Pascal string) [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] public readonly byte[] diskname; /// Last reserved block public readonly uint lastreserved; /// First reserved block public readonly uint firstreserved; /// Free reserved blocks public readonly uint reservedfree; /// Size of reserved blocks in bytes public readonly ushort reservedblocksize; /// Blocks in rootblock, including bitmap public readonly ushort rootblockclusters; /// Free blocks public readonly uint blocksfree; /// Blocks that must be always free public readonly uint alwaysfree; /// Current bitmapfield number for allocation public readonly uint rovingPointer; /// Pointer to deldir public readonly uint delDirPtr; /// Disk size in sectors public readonly uint diskSize; /// Rootblock extension public readonly uint extension; /// Unused public readonly uint unused; } #endregion }