2017-08-08 11:51:48 +01:00
|
|
|
|
// /***************************************************************************
|
2020-02-27 12:31:25 +00:00
|
|
|
|
// Aaru Data Preservation Suite
|
2017-08-08 11:51:48 +01:00
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
//
|
|
|
|
|
|
// Filename : EFS.cs
|
|
|
|
|
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
|
|
|
|
|
//
|
2017-12-19 03:50:57 +00:00
|
|
|
|
// Component : Extent File System plugin
|
2017-08-08 11:51:48 +01:00
|
|
|
|
//
|
|
|
|
|
|
// --[ Description ] ----------------------------------------------------------
|
|
|
|
|
|
//
|
2017-12-19 03:50:57 +00:00
|
|
|
|
// Identifies the Extent File System and shows information.
|
2017-08-08 11:51:48 +01:00
|
|
|
|
//
|
|
|
|
|
|
// --[ 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 <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
//
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
2020-12-31 23:08:23 +00:00
|
|
|
|
// Copyright © 2011-2021 Natalia Portillo
|
2017-08-08 11:51:48 +01:00
|
|
|
|
// ****************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
using System;
|
2017-12-22 08:43:22 +00:00
|
|
|
|
using System.Diagnostics.CodeAnalysis;
|
2017-08-08 11:51:48 +01:00
|
|
|
|
using System.Runtime.InteropServices;
|
|
|
|
|
|
using System.Text;
|
2020-02-27 00:33:26 +00:00
|
|
|
|
using Aaru.CommonTypes;
|
|
|
|
|
|
using Aaru.CommonTypes.Enums;
|
|
|
|
|
|
using Aaru.CommonTypes.Interfaces;
|
|
|
|
|
|
using Aaru.Console;
|
2020-07-20 15:43:52 +01:00
|
|
|
|
using Aaru.Helpers;
|
2017-12-21 14:30:38 +00:00
|
|
|
|
using Schemas;
|
2020-02-27 00:33:26 +00:00
|
|
|
|
using Marshal = Aaru.Helpers.Marshal;
|
2017-08-08 11:51:48 +01:00
|
|
|
|
|
2020-02-27 00:33:26 +00:00
|
|
|
|
namespace Aaru.Filesystems
|
2017-08-08 11:51:48 +01:00
|
|
|
|
{
|
2021-08-17 14:25:12 +01:00
|
|
|
|
/// <inheritdoc />
|
2021-08-17 13:56:05 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Implements identification for the SGI Extent FileSystem
|
|
|
|
|
|
/// </summary>
|
2020-07-22 13:20:25 +01:00
|
|
|
|
public sealed class EFS : IFilesystem
|
2017-08-08 11:51:48 +01:00
|
|
|
|
{
|
2018-06-22 08:08:38 +01:00
|
|
|
|
const uint EFS_MAGIC = 0x00072959;
|
2017-12-22 08:43:22 +00:00
|
|
|
|
const uint EFS_MAGIC_NEW = 0x0007295A;
|
2017-08-08 11:51:48 +01:00
|
|
|
|
|
2021-08-17 13:56:05 +01:00
|
|
|
|
/// <inheritdoc />
|
2017-12-26 08:01:40 +00:00
|
|
|
|
public FileSystemType XmlFsType { get; private set; }
|
2021-08-17 13:56:05 +01:00
|
|
|
|
/// <inheritdoc />
|
2018-06-22 08:08:38 +01:00
|
|
|
|
public Encoding Encoding { get; private set; }
|
2021-08-17 13:56:05 +01:00
|
|
|
|
/// <inheritdoc />
|
2018-06-22 08:08:38 +01:00
|
|
|
|
public string Name => "Extent File System Plugin";
|
2021-08-17 13:56:05 +01:00
|
|
|
|
/// <inheritdoc />
|
2018-06-22 08:08:38 +01:00
|
|
|
|
public Guid Id => new Guid("52A43F90-9AF3-4391-ADFE-65598DEEABAB");
|
2021-08-17 13:56:05 +01:00
|
|
|
|
/// <inheritdoc />
|
2018-08-29 22:15:43 +01:00
|
|
|
|
public string Author => "Natalia Portillo";
|
2017-08-08 11:51:48 +01:00
|
|
|
|
|
2021-08-17 13:56:05 +01:00
|
|
|
|
/// <inheritdoc />
|
2017-12-26 07:28:40 +00:00
|
|
|
|
public bool Identify(IMediaImage imagePlugin, Partition partition)
|
2017-08-08 11:51:48 +01:00
|
|
|
|
{
|
2020-02-29 18:03:35 +00:00
|
|
|
|
if(imagePlugin.Info.SectorSize < 512)
|
|
|
|
|
|
return false;
|
2017-08-08 11:51:48 +01:00
|
|
|
|
|
|
|
|
|
|
// Misaligned
|
2017-12-26 06:05:12 +00:00
|
|
|
|
if(imagePlugin.Info.XmlMediaType == XmlMediaType.OpticalDisc)
|
2017-08-08 11:51:48 +01:00
|
|
|
|
{
|
2020-07-20 21:11:32 +01:00
|
|
|
|
uint sbSize = (uint)((Marshal.SizeOf<Superblock>() + 0x200) / imagePlugin.Info.SectorSize);
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2020-07-20 21:11:32 +01:00
|
|
|
|
if((Marshal.SizeOf<Superblock>() + 0x200) % imagePlugin.Info.SectorSize != 0)
|
2020-02-29 18:03:35 +00:00
|
|
|
|
sbSize++;
|
2017-08-08 11:51:48 +01:00
|
|
|
|
|
2017-08-09 04:46:14 +01:00
|
|
|
|
byte[] sector = imagePlugin.ReadSectors(partition.Start, sbSize);
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2020-07-20 21:11:32 +01:00
|
|
|
|
if(sector.Length < Marshal.SizeOf<Superblock>())
|
2020-02-29 18:03:35 +00:00
|
|
|
|
return false;
|
2017-08-08 11:51:48 +01:00
|
|
|
|
|
2020-07-20 21:11:32 +01:00
|
|
|
|
byte[] sbpiece = new byte[Marshal.SizeOf<Superblock>()];
|
2017-08-08 11:51:48 +01:00
|
|
|
|
|
2020-07-20 21:11:32 +01:00
|
|
|
|
Array.Copy(sector, 0x200, sbpiece, 0, Marshal.SizeOf<Superblock>());
|
2017-08-08 11:51:48 +01:00
|
|
|
|
|
2020-07-20 21:11:32 +01:00
|
|
|
|
Superblock sb = Marshal.ByteArrayToStructureBigEndian<Superblock>(sbpiece);
|
2017-08-08 11:51:48 +01:00
|
|
|
|
|
2020-02-27 23:48:41 +00:00
|
|
|
|
AaruConsole.DebugWriteLine("EFS plugin", "magic at 0x{0:X3} = 0x{1:X8} (expected 0x{2:X8} or 0x{3:X8})",
|
2020-07-20 21:11:32 +01:00
|
|
|
|
0x200, sb.sb_magic, EFS_MAGIC, EFS_MAGIC_NEW);
|
2017-08-08 11:51:48 +01:00
|
|
|
|
|
2020-07-20 21:11:32 +01:00
|
|
|
|
if(sb.sb_magic == EFS_MAGIC ||
|
|
|
|
|
|
sb.sb_magic == EFS_MAGIC_NEW)
|
2020-02-29 18:03:35 +00:00
|
|
|
|
return true;
|
2017-08-08 11:51:48 +01:00
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
2020-07-20 21:11:32 +01:00
|
|
|
|
uint sbSize = (uint)(Marshal.SizeOf<Superblock>() / imagePlugin.Info.SectorSize);
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2020-07-20 21:11:32 +01:00
|
|
|
|
if(Marshal.SizeOf<Superblock>() % imagePlugin.Info.SectorSize != 0)
|
2020-02-29 18:03:35 +00:00
|
|
|
|
sbSize++;
|
2017-08-08 11:51:48 +01:00
|
|
|
|
|
|
|
|
|
|
byte[] sector = imagePlugin.ReadSectors(partition.Start + 1, sbSize);
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2020-07-20 21:11:32 +01:00
|
|
|
|
if(sector.Length < Marshal.SizeOf<Superblock>())
|
2020-02-29 18:03:35 +00:00
|
|
|
|
return false;
|
2017-08-08 11:51:48 +01:00
|
|
|
|
|
2020-07-20 21:11:32 +01:00
|
|
|
|
Superblock sb = Marshal.ByteArrayToStructureBigEndian<Superblock>(sector);
|
2017-08-08 11:51:48 +01:00
|
|
|
|
|
2020-02-27 23:48:41 +00:00
|
|
|
|
AaruConsole.DebugWriteLine("EFS plugin", "magic at {0} = 0x{1:X8} (expected 0x{2:X8} or 0x{3:X8})", 1,
|
2020-07-20 21:11:32 +01:00
|
|
|
|
sb.sb_magic, EFS_MAGIC, EFS_MAGIC_NEW);
|
2017-08-08 11:51:48 +01:00
|
|
|
|
|
2020-07-20 21:11:32 +01:00
|
|
|
|
if(sb.sb_magic == EFS_MAGIC ||
|
|
|
|
|
|
sb.sb_magic == EFS_MAGIC_NEW)
|
2020-02-29 18:03:35 +00:00
|
|
|
|
return true;
|
2017-08-08 11:51:48 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2021-08-17 13:56:05 +01:00
|
|
|
|
/// <inheritdoc />
|
2017-12-26 08:01:40 +00:00
|
|
|
|
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
|
2020-02-29 18:03:35 +00:00
|
|
|
|
Encoding encoding)
|
2017-08-08 11:51:48 +01:00
|
|
|
|
{
|
2018-06-22 08:08:38 +01:00
|
|
|
|
Encoding = encoding ?? Encoding.GetEncoding("iso-8859-15");
|
2017-08-08 11:51:48 +01:00
|
|
|
|
information = "";
|
|
|
|
|
|
|
2020-02-29 18:03:35 +00:00
|
|
|
|
if(imagePlugin.Info.SectorSize < 512)
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
2020-07-20 21:11:32 +01:00
|
|
|
|
var efsSb = new Superblock();
|
2017-08-08 11:51:48 +01:00
|
|
|
|
|
|
|
|
|
|
// Misaligned
|
2017-12-26 06:05:12 +00:00
|
|
|
|
if(imagePlugin.Info.XmlMediaType == XmlMediaType.OpticalDisc)
|
2017-08-08 11:51:48 +01:00
|
|
|
|
{
|
2020-07-20 21:11:32 +01:00
|
|
|
|
uint sbSize = (uint)((Marshal.SizeOf<Superblock>() + 0x400) / imagePlugin.Info.SectorSize);
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2020-07-20 21:11:32 +01:00
|
|
|
|
if((Marshal.SizeOf<Superblock>() + 0x400) % imagePlugin.Info.SectorSize != 0)
|
2020-02-29 18:03:35 +00:00
|
|
|
|
sbSize++;
|
2017-08-08 11:51:48 +01:00
|
|
|
|
|
2017-08-09 04:46:14 +01:00
|
|
|
|
byte[] sector = imagePlugin.ReadSectors(partition.Start, sbSize);
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2020-07-20 21:11:32 +01:00
|
|
|
|
if(sector.Length < Marshal.SizeOf<Superblock>())
|
2020-02-29 18:03:35 +00:00
|
|
|
|
return;
|
2017-08-08 11:51:48 +01:00
|
|
|
|
|
2020-07-20 21:11:32 +01:00
|
|
|
|
byte[] sbpiece = new byte[Marshal.SizeOf<Superblock>()];
|
2017-08-08 11:51:48 +01:00
|
|
|
|
|
2020-07-20 21:11:32 +01:00
|
|
|
|
Array.Copy(sector, 0x200, sbpiece, 0, Marshal.SizeOf<Superblock>());
|
2017-08-08 11:51:48 +01:00
|
|
|
|
|
2020-07-20 21:11:32 +01:00
|
|
|
|
efsSb = Marshal.ByteArrayToStructureBigEndian<Superblock>(sbpiece);
|
2017-08-08 11:51:48 +01:00
|
|
|
|
|
2020-02-27 23:48:41 +00:00
|
|
|
|
AaruConsole.DebugWriteLine("EFS plugin", "magic at 0x{0:X3} = 0x{1:X8} (expected 0x{2:X8} or 0x{3:X8})",
|
2020-02-29 18:03:35 +00:00
|
|
|
|
0x200, efsSb.sb_magic, EFS_MAGIC, EFS_MAGIC_NEW);
|
2017-08-08 11:51:48 +01:00
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
2020-07-20 21:11:32 +01:00
|
|
|
|
uint sbSize = (uint)(Marshal.SizeOf<Superblock>() / imagePlugin.Info.SectorSize);
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2020-07-20 21:11:32 +01:00
|
|
|
|
if(Marshal.SizeOf<Superblock>() % imagePlugin.Info.SectorSize != 0)
|
2020-02-29 18:03:35 +00:00
|
|
|
|
sbSize++;
|
2017-08-08 11:51:48 +01:00
|
|
|
|
|
|
|
|
|
|
byte[] sector = imagePlugin.ReadSectors(partition.Start + 1, sbSize);
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2020-07-20 21:11:32 +01:00
|
|
|
|
if(sector.Length < Marshal.SizeOf<Superblock>())
|
2020-02-29 18:03:35 +00:00
|
|
|
|
return;
|
2017-08-08 11:51:48 +01:00
|
|
|
|
|
2020-07-20 21:11:32 +01:00
|
|
|
|
efsSb = Marshal.ByteArrayToStructureBigEndian<Superblock>(sector);
|
2017-08-08 11:51:48 +01:00
|
|
|
|
|
2020-02-27 23:48:41 +00:00
|
|
|
|
AaruConsole.DebugWriteLine("EFS plugin", "magic at {0} = 0x{1:X8} (expected 0x{2:X8} or 0x{3:X8})", 1,
|
2020-02-29 18:03:35 +00:00
|
|
|
|
efsSb.sb_magic, EFS_MAGIC, EFS_MAGIC_NEW);
|
2017-08-08 11:51:48 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
2020-02-29 18:03:35 +00:00
|
|
|
|
if(efsSb.sb_magic != EFS_MAGIC &&
|
|
|
|
|
|
efsSb.sb_magic != EFS_MAGIC_NEW)
|
|
|
|
|
|
return;
|
2017-08-08 11:51:48 +01:00
|
|
|
|
|
2020-02-29 18:03:35 +00:00
|
|
|
|
var sb = new StringBuilder();
|
2017-08-08 11:51:48 +01:00
|
|
|
|
|
|
|
|
|
|
sb.AppendLine("SGI extent filesystem");
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
|
|
|
|
|
if(efsSb.sb_magic == EFS_MAGIC_NEW)
|
|
|
|
|
|
sb.AppendLine("New version");
|
|
|
|
|
|
|
2017-08-08 11:51:48 +01:00
|
|
|
|
sb.AppendFormat("Filesystem size: {0} basic blocks", efsSb.sb_size).AppendLine();
|
|
|
|
|
|
sb.AppendFormat("First cylinder group starts at block {0}", efsSb.sb_firstcg).AppendLine();
|
|
|
|
|
|
sb.AppendFormat("Cylinder group size: {0} basic blocks", efsSb.sb_cgfsize).AppendLine();
|
|
|
|
|
|
sb.AppendFormat("{0} inodes per cylinder group", efsSb.sb_cgisize).AppendLine();
|
|
|
|
|
|
sb.AppendFormat("{0} sectors per track", efsSb.sb_sectors).AppendLine();
|
|
|
|
|
|
sb.AppendFormat("{0} heads per cylinder", efsSb.sb_heads).AppendLine();
|
|
|
|
|
|
sb.AppendFormat("{0} cylinder groups", efsSb.sb_ncg).AppendLine();
|
2017-12-23 03:59:48 +00:00
|
|
|
|
sb.AppendFormat("Volume created on {0}", DateHandlers.UnixToDateTime(efsSb.sb_time)).AppendLine();
|
2017-08-08 11:51:48 +01:00
|
|
|
|
sb.AppendFormat("{0} bytes on bitmap", efsSb.sb_bmsize).AppendLine();
|
|
|
|
|
|
sb.AppendFormat("{0} free blocks", efsSb.sb_tfree).AppendLine();
|
|
|
|
|
|
sb.AppendFormat("{0} free inodes", efsSb.sb_tinode).AppendLine();
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
|
|
|
|
|
if(efsSb.sb_bmblock > 0)
|
|
|
|
|
|
sb.AppendFormat("Bitmap resides at block {0}", efsSb.sb_bmblock).AppendLine();
|
|
|
|
|
|
|
2017-08-08 11:51:48 +01:00
|
|
|
|
if(efsSb.sb_replsb > 0)
|
|
|
|
|
|
sb.AppendFormat("Replacement superblock resides at block {0}", efsSb.sb_replsb).AppendLine();
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
|
|
|
|
|
if(efsSb.sb_lastinode > 0)
|
|
|
|
|
|
sb.AppendFormat("Last inode allocated: {0}", efsSb.sb_lastinode).AppendLine();
|
|
|
|
|
|
|
|
|
|
|
|
if(efsSb.sb_dirty > 0)
|
|
|
|
|
|
sb.AppendLine("Volume is dirty");
|
|
|
|
|
|
|
2017-08-08 11:51:48 +01:00
|
|
|
|
sb.AppendFormat("Checksum: 0x{0:X8}", efsSb.sb_checksum).AppendLine();
|
2017-12-26 08:01:40 +00:00
|
|
|
|
sb.AppendFormat("Volume name: {0}", StringHandlers.CToString(efsSb.sb_fname, Encoding)).AppendLine();
|
|
|
|
|
|
sb.AppendFormat("Volume pack: {0}", StringHandlers.CToString(efsSb.sb_fpack, Encoding)).AppendLine();
|
2017-08-08 11:51:48 +01:00
|
|
|
|
|
|
|
|
|
|
information = sb.ToString();
|
|
|
|
|
|
|
2017-12-26 08:01:40 +00:00
|
|
|
|
XmlFsType = new FileSystemType
|
2017-08-08 11:51:48 +01:00
|
|
|
|
{
|
2020-07-20 04:34:16 +01:00
|
|
|
|
Type = "Extent File System",
|
|
|
|
|
|
ClusterSize = 512,
|
2019-04-23 01:38:33 +01:00
|
|
|
|
Clusters = (ulong)efsSb.sb_size,
|
2020-07-20 04:34:16 +01:00
|
|
|
|
FreeClusters = (ulong)efsSb.sb_tfree,
|
|
|
|
|
|
FreeClustersSpecified = true,
|
2018-06-22 08:08:38 +01:00
|
|
|
|
Dirty = efsSb.sb_dirty > 0,
|
|
|
|
|
|
VolumeName = StringHandlers.CToString(efsSb.sb_fname, Encoding),
|
|
|
|
|
|
VolumeSerial = $"{efsSb.sb_checksum:X8}",
|
|
|
|
|
|
CreationDate = DateHandlers.UnixToDateTime(efsSb.sb_time),
|
2017-08-08 11:51:48 +01:00
|
|
|
|
CreationDateSpecified = true
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2020-02-29 18:03:35 +00:00
|
|
|
|
[StructLayout(LayoutKind.Sequential, Pack = 1), SuppressMessage("ReSharper", "InconsistentNaming")]
|
2020-11-11 04:19:18 +00:00
|
|
|
|
readonly struct Superblock
|
2017-12-24 02:37:41 +00:00
|
|
|
|
{
|
|
|
|
|
|
/* 0: fs size incl. bb 0 (in bb) */
|
2019-04-23 01:38:33 +01:00
|
|
|
|
public readonly int sb_size;
|
2017-12-24 02:37:41 +00:00
|
|
|
|
/* 4: first cg offset (in bb) */
|
2019-04-23 01:38:33 +01:00
|
|
|
|
public readonly int sb_firstcg;
|
2017-12-24 02:37:41 +00:00
|
|
|
|
/* 8: cg size (in bb) */
|
2019-04-23 01:38:33 +01:00
|
|
|
|
public readonly int sb_cgfsize;
|
2017-12-24 02:37:41 +00:00
|
|
|
|
/* 12: inodes/cg (in bb) */
|
2019-04-23 01:38:33 +01:00
|
|
|
|
public readonly short sb_cgisize;
|
2017-12-24 02:37:41 +00:00
|
|
|
|
/* 14: geom: sectors/track */
|
2019-04-23 01:38:33 +01:00
|
|
|
|
public readonly short sb_sectors;
|
2017-12-24 02:37:41 +00:00
|
|
|
|
/* 16: geom: heads/cylinder (unused) */
|
2019-04-23 01:38:33 +01:00
|
|
|
|
public readonly short sb_heads;
|
2017-12-24 02:37:41 +00:00
|
|
|
|
/* 18: num of cg's in the filesystem */
|
2019-04-23 01:38:33 +01:00
|
|
|
|
public readonly short sb_ncg;
|
2017-12-24 02:37:41 +00:00
|
|
|
|
/* 20: non-0 indicates fsck required */
|
2019-04-23 01:38:33 +01:00
|
|
|
|
public readonly short sb_dirty;
|
2017-12-24 02:37:41 +00:00
|
|
|
|
/* 22: */
|
2019-04-23 01:38:33 +01:00
|
|
|
|
public readonly short sb_pad0;
|
2017-12-24 02:37:41 +00:00
|
|
|
|
/* 24: superblock ctime */
|
2019-04-23 01:38:33 +01:00
|
|
|
|
public readonly int sb_time;
|
2017-12-24 02:37:41 +00:00
|
|
|
|
/* 28: magic [0] */
|
2019-04-23 01:38:33 +01:00
|
|
|
|
public readonly uint sb_magic;
|
2017-12-24 02:37:41 +00:00
|
|
|
|
/* 32: name of filesystem */
|
2018-06-22 08:08:38 +01:00
|
|
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)]
|
2019-04-23 01:38:33 +01:00
|
|
|
|
public readonly byte[] sb_fname;
|
2017-12-24 02:37:41 +00:00
|
|
|
|
/* 38: name of filesystem pack */
|
2018-06-22 08:08:38 +01:00
|
|
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)]
|
2019-04-23 01:38:33 +01:00
|
|
|
|
public readonly byte[] sb_fpack;
|
2017-12-24 02:37:41 +00:00
|
|
|
|
/* 44: bitmap size (in bytes) */
|
2019-04-23 01:38:33 +01:00
|
|
|
|
public readonly int sb_bmsize;
|
2017-12-24 02:37:41 +00:00
|
|
|
|
/* 48: total free data blocks */
|
2019-04-23 01:38:33 +01:00
|
|
|
|
public readonly int sb_tfree;
|
2017-12-24 02:37:41 +00:00
|
|
|
|
/* 52: total free inodes */
|
2019-04-23 01:38:33 +01:00
|
|
|
|
public readonly int sb_tinode;
|
2017-12-24 02:37:41 +00:00
|
|
|
|
/* 56: bitmap offset (grown fs) */
|
2019-04-23 01:38:33 +01:00
|
|
|
|
public readonly int sb_bmblock;
|
2017-12-24 02:37:41 +00:00
|
|
|
|
/* 62: repl. superblock offset */
|
2019-04-23 01:38:33 +01:00
|
|
|
|
public readonly int sb_replsb;
|
2017-12-24 02:37:41 +00:00
|
|
|
|
/* 64: last allocated inode */
|
2019-04-23 01:38:33 +01:00
|
|
|
|
public readonly int sb_lastinode;
|
2017-12-24 02:37:41 +00:00
|
|
|
|
/* 68: unused */
|
2018-06-22 08:08:38 +01:00
|
|
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 20)]
|
2019-04-23 01:38:33 +01:00
|
|
|
|
public readonly byte[] sb_spare;
|
2017-12-24 02:37:41 +00:00
|
|
|
|
/* 88: checksum (all above) */
|
2019-04-23 01:38:33 +01:00
|
|
|
|
public readonly uint sb_checksum;
|
2017-12-24 02:37:41 +00:00
|
|
|
|
}
|
2017-08-08 11:51:48 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|