2017-07-19 16:31:08 +01:00
|
|
|
|
// /***************************************************************************
|
2020-02-27 12:31:25 +00:00
|
|
|
|
// Aaru Data Preservation Suite
|
2016-07-28 18:13:49 +01:00
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
//
|
|
|
|
|
|
// Filename : BFS.cs
|
|
|
|
|
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
|
|
|
|
|
//
|
|
|
|
|
|
// Component : BeOS filesystem plugin.
|
|
|
|
|
|
//
|
|
|
|
|
|
// --[ Description ] ----------------------------------------------------------
|
|
|
|
|
|
//
|
|
|
|
|
|
// Identifies the BeOS filesystem and shows information.
|
|
|
|
|
|
//
|
|
|
|
|
|
// --[ 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-01-03 17:51:30 +00:00
|
|
|
|
// Copyright © 2011-2020 Natalia Portillo
|
2016-07-28 18:13:49 +01:00
|
|
|
|
// ****************************************************************************/
|
2014-04-17 19:58:14 +00:00
|
|
|
|
|
2011-03-28 13:46:30 +00:00
|
|
|
|
using System;
|
2017-07-23 21:01:26 +01:00
|
|
|
|
using System.Runtime.InteropServices;
|
2017-07-19 16:31:08 +01:00
|
|
|
|
using System.Text;
|
2020-02-27 00:33:26 +00:00
|
|
|
|
using Aaru.CommonTypes;
|
|
|
|
|
|
using Aaru.CommonTypes.Interfaces;
|
2017-12-21 14:30:38 +00:00
|
|
|
|
using Schemas;
|
2020-02-27 00:33:26 +00:00
|
|
|
|
using Marshal = Aaru.Helpers.Marshal;
|
2011-03-28 13:46:30 +00:00
|
|
|
|
|
2020-02-27 00:33:26 +00:00
|
|
|
|
namespace Aaru.Filesystems
|
2011-03-28 13:46:30 +00:00
|
|
|
|
{
|
2016-07-28 22:25:26 +01:00
|
|
|
|
// Information from Practical Filesystem Design, ISBN 1-55860-497-9
|
2017-12-26 06:05:12 +00:00
|
|
|
|
public class BeFS : IFilesystem
|
2014-04-14 02:29:13 +00:00
|
|
|
|
{
|
|
|
|
|
|
// Little endian constants (that is, as read by .NET :p)
|
2016-07-28 22:25:26 +01:00
|
|
|
|
const uint BEFS_MAGIC1 = 0x42465331;
|
|
|
|
|
|
const uint BEFS_MAGIC2 = 0xDD121031;
|
|
|
|
|
|
const uint BEFS_MAGIC3 = 0x15B6830E;
|
|
|
|
|
|
const uint BEFS_ENDIAN = 0x42494745;
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2014-04-14 02:29:13 +00:00
|
|
|
|
// Big endian constants
|
2016-07-28 22:25:26 +01:00
|
|
|
|
const uint BEFS_CIGAM1 = 0x31534642;
|
|
|
|
|
|
const uint BEFS_NAIDNE = 0x45474942;
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2014-04-14 02:29:13 +00:00
|
|
|
|
// Common constants
|
2016-07-28 22:25:26 +01:00
|
|
|
|
const uint BEFS_CLEAN = 0x434C454E;
|
|
|
|
|
|
const uint BEFS_DIRTY = 0x44495254;
|
2012-08-05 00:43:49 +00:00
|
|
|
|
|
2017-12-26 08:01:40 +00:00
|
|
|
|
public FileSystemType XmlFsType { get; private set; }
|
2018-06-22 08:08:38 +01:00
|
|
|
|
public Encoding Encoding { get; private set; }
|
|
|
|
|
|
public string Name => "Be Filesystem";
|
|
|
|
|
|
public Guid Id => new Guid("dc8572b3-b6ad-46e4-8de9-cbe123ff6672");
|
2018-08-29 22:15:43 +01:00
|
|
|
|
public string Author => "Natalia Portillo";
|
2016-07-27 13:32:45 +01:00
|
|
|
|
|
2017-12-26 07:28:40 +00:00
|
|
|
|
public bool Identify(IMediaImage imagePlugin, Partition partition)
|
2014-04-14 02:29:13 +00:00
|
|
|
|
{
|
2020-02-29 18:03:35 +00:00
|
|
|
|
if(2 + partition.Start >= partition.End)
|
|
|
|
|
|
return false;
|
2014-07-09 19:49:14 +01:00
|
|
|
|
|
2017-12-22 08:43:22 +00:00
|
|
|
|
byte[] sbSector = imagePlugin.ReadSector(0 + partition.Start);
|
2014-04-14 01:14:20 +00:00
|
|
|
|
|
2018-06-22 08:08:38 +01:00
|
|
|
|
uint magic = BitConverter.ToUInt32(sbSector, 0x20);
|
2018-06-20 22:22:21 +01:00
|
|
|
|
uint magicBe = BigEndianBitConverter.ToUInt32(sbSector, 0x20);
|
2014-04-14 01:14:20 +00:00
|
|
|
|
|
2020-02-29 18:03:35 +00:00
|
|
|
|
if(magic == BEFS_MAGIC1 ||
|
|
|
|
|
|
magicBe == BEFS_MAGIC1)
|
|
|
|
|
|
return true;
|
2015-11-09 19:42:00 +00:00
|
|
|
|
|
2017-12-22 08:43:22 +00:00
|
|
|
|
if(sbSector.Length >= 0x400)
|
2015-11-09 22:17:45 +00:00
|
|
|
|
{
|
2018-06-22 08:08:38 +01:00
|
|
|
|
magic = BitConverter.ToUInt32(sbSector, 0x220);
|
2017-12-22 08:43:22 +00:00
|
|
|
|
magicBe = BigEndianBitConverter.ToUInt32(sbSector, 0x220);
|
2015-11-09 22:17:45 +00:00
|
|
|
|
}
|
2015-11-09 19:42:00 +00:00
|
|
|
|
|
2020-02-29 18:03:35 +00:00
|
|
|
|
if(magic == BEFS_MAGIC1 ||
|
|
|
|
|
|
magicBe == BEFS_MAGIC1)
|
|
|
|
|
|
return true;
|
2015-11-09 19:42:00 +00:00
|
|
|
|
|
2017-12-22 08:43:22 +00:00
|
|
|
|
sbSector = imagePlugin.ReadSector(1 + partition.Start);
|
2016-04-19 02:11:47 +01:00
|
|
|
|
|
2018-06-22 08:08:38 +01:00
|
|
|
|
magic = BitConverter.ToUInt32(sbSector, 0x20);
|
2017-12-22 08:43:22 +00:00
|
|
|
|
magicBe = BigEndianBitConverter.ToUInt32(sbSector, 0x20);
|
2011-03-28 22:56:20 +00:00
|
|
|
|
|
2017-12-22 08:43:22 +00:00
|
|
|
|
return magic == BEFS_MAGIC1 || magicBe == BEFS_MAGIC1;
|
2014-04-14 02:29:13 +00:00
|
|
|
|
}
|
2014-04-14 01:14:20 +00:00
|
|
|
|
|
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)
|
2014-04-14 02:29:13 +00:00
|
|
|
|
{
|
2018-06-22 08:08:38 +01:00
|
|
|
|
Encoding = encoding ?? Encoding.GetEncoding("iso-8859-15");
|
2014-04-14 02:29:13 +00:00
|
|
|
|
information = "";
|
|
|
|
|
|
|
2020-02-29 18:03:35 +00:00
|
|
|
|
var sb = new StringBuilder();
|
2016-04-19 02:11:47 +01:00
|
|
|
|
|
2020-02-29 18:03:35 +00:00
|
|
|
|
var besb = new BeSuperBlock();
|
2014-04-14 01:14:20 +00:00
|
|
|
|
|
2017-12-22 08:43:22 +00:00
|
|
|
|
byte[] sbSector = imagePlugin.ReadSector(0 + partition.Start);
|
2014-04-14 01:14:20 +00:00
|
|
|
|
|
2017-12-21 16:07:20 +00:00
|
|
|
|
bool littleEndian;
|
2014-04-14 01:14:20 +00:00
|
|
|
|
|
2017-12-22 08:43:22 +00:00
|
|
|
|
besb.magic1 = BigEndianBitConverter.ToUInt32(sbSector, 0x20);
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
|
|
|
|
|
if(besb.magic1 == BEFS_MAGIC1 ||
|
|
|
|
|
|
besb.magic1 == BEFS_CIGAM1) // Magic is at offset
|
2017-07-23 21:01:26 +01:00
|
|
|
|
littleEndian = besb.magic1 == BEFS_CIGAM1;
|
2014-04-14 02:29:13 +00:00
|
|
|
|
else
|
|
|
|
|
|
{
|
2018-06-22 08:08:38 +01:00
|
|
|
|
sbSector = imagePlugin.ReadSector(1 + partition.Start);
|
2017-12-22 08:43:22 +00:00
|
|
|
|
besb.magic1 = BigEndianBitConverter.ToUInt32(sbSector, 0x20);
|
2016-04-19 02:11:47 +01:00
|
|
|
|
|
2020-02-29 18:03:35 +00:00
|
|
|
|
if(besb.magic1 == BEFS_MAGIC1 ||
|
|
|
|
|
|
besb.magic1 == BEFS_CIGAM1) // There is a boot sector
|
2017-07-23 21:01:26 +01:00
|
|
|
|
littleEndian = besb.magic1 == BEFS_CIGAM1;
|
2017-12-22 08:43:22 +00:00
|
|
|
|
else if(sbSector.Length >= 0x400)
|
2015-11-09 19:42:00 +00:00
|
|
|
|
{
|
2017-07-19 16:37:11 +01:00
|
|
|
|
byte[] temp = imagePlugin.ReadSector(0 + partition.Start);
|
2015-11-09 19:42:00 +00:00
|
|
|
|
besb.magic1 = BigEndianBitConverter.ToUInt32(temp, 0x220);
|
|
|
|
|
|
|
2020-02-29 18:03:35 +00:00
|
|
|
|
if(besb.magic1 == BEFS_MAGIC1 ||
|
|
|
|
|
|
besb.magic1 == BEFS_CIGAM1) // There is a boot sector
|
2015-11-09 19:42:00 +00:00
|
|
|
|
{
|
2017-07-23 21:01:26 +01:00
|
|
|
|
littleEndian = besb.magic1 == BEFS_CIGAM1;
|
2018-06-22 08:08:38 +01:00
|
|
|
|
sbSector = new byte[0x200];
|
2017-12-22 08:43:22 +00:00
|
|
|
|
Array.Copy(temp, 0x200, sbSector, 0, 0x200);
|
2015-11-09 19:42:00 +00:00
|
|
|
|
}
|
2020-02-29 18:03:35 +00:00
|
|
|
|
else
|
|
|
|
|
|
return;
|
2015-11-09 19:42:00 +00:00
|
|
|
|
}
|
2020-02-29 18:03:35 +00:00
|
|
|
|
else
|
|
|
|
|
|
return;
|
2014-04-14 02:29:13 +00:00
|
|
|
|
}
|
2012-08-05 00:43:49 +00:00
|
|
|
|
|
2020-02-29 18:03:35 +00:00
|
|
|
|
if(littleEndian)
|
|
|
|
|
|
besb = Marshal.ByteArrayToStructureLittleEndian<BeSuperBlock>(sbSector);
|
|
|
|
|
|
else
|
|
|
|
|
|
besb = Marshal.ByteArrayToStructureBigEndian<BeSuperBlock>(sbSector);
|
2017-07-23 21:01:26 +01:00
|
|
|
|
|
2017-12-22 08:43:22 +00:00
|
|
|
|
sb.AppendLine(littleEndian ? "Little-endian BeFS" : "Big-endian BeFS");
|
2016-04-19 02:11:47 +01:00
|
|
|
|
|
2020-02-29 18:03:35 +00:00
|
|
|
|
if(besb.magic1 != BEFS_MAGIC1 ||
|
|
|
|
|
|
besb.fs_byte_order != BEFS_ENDIAN ||
|
2018-06-22 08:08:38 +01:00
|
|
|
|
besb.magic2 != BEFS_MAGIC2 ||
|
2020-02-29 18:03:35 +00:00
|
|
|
|
besb.magic3 != BEFS_MAGIC3 ||
|
|
|
|
|
|
besb.root_dir_len != 1 ||
|
2018-06-22 08:08:38 +01:00
|
|
|
|
besb.indices_len != 1 ||
|
2017-12-20 17:26:28 +00:00
|
|
|
|
1 << (int)besb.block_shift != besb.block_size)
|
2014-04-14 02:29:13 +00:00
|
|
|
|
{
|
|
|
|
|
|
sb.AppendLine("Superblock seems corrupt, following information may be incorrect");
|
|
|
|
|
|
sb.AppendFormat("Magic 1: 0x{0:X8} (Should be 0x42465331)", besb.magic1).AppendLine();
|
|
|
|
|
|
sb.AppendFormat("Magic 2: 0x{0:X8} (Should be 0xDD121031)", besb.magic2).AppendLine();
|
|
|
|
|
|
sb.AppendFormat("Magic 3: 0x{0:X8} (Should be 0x15B6830E)", besb.magic3).AppendLine();
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
|
|
|
|
|
sb.AppendFormat("Filesystem endianness: 0x{0:X8} (Should be 0x42494745)", besb.fs_byte_order).
|
|
|
|
|
|
AppendLine();
|
|
|
|
|
|
|
2014-04-14 02:29:13 +00:00
|
|
|
|
sb.AppendFormat("Root folder's i-node size: {0} blocks (Should be 1)", besb.root_dir_len).AppendLine();
|
|
|
|
|
|
sb.AppendFormat("Indices' i-node size: {0} blocks (Should be 1)", besb.indices_len).AppendLine();
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2014-04-14 02:29:13 +00:00
|
|
|
|
sb.AppendFormat("1 << block_shift == block_size => 1 << {0} == {1} (Should be {2})", besb.block_shift,
|
2017-12-19 20:33:03 +00:00
|
|
|
|
1 << (int)besb.block_shift, besb.block_size).AppendLine();
|
2014-04-14 02:29:13 +00:00
|
|
|
|
}
|
2016-04-19 02:11:47 +01:00
|
|
|
|
|
2017-12-24 02:37:41 +00:00
|
|
|
|
switch(besb.flags)
|
|
|
|
|
|
{
|
2017-12-21 04:43:29 +00:00
|
|
|
|
case BEFS_CLEAN:
|
2017-12-22 08:43:22 +00:00
|
|
|
|
sb.AppendLine(besb.log_start == besb.log_end ? "Filesystem is clean" : "Filesystem is dirty");
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2017-12-21 04:43:29 +00:00
|
|
|
|
break;
|
2017-12-24 02:37:41 +00:00
|
|
|
|
case BEFS_DIRTY:
|
|
|
|
|
|
sb.AppendLine("Filesystem is dirty");
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2017-12-21 04:43:29 +00:00
|
|
|
|
break;
|
2017-12-24 02:37:41 +00:00
|
|
|
|
default:
|
|
|
|
|
|
sb.AppendFormat("Unknown flags: {0:X8}", besb.flags).AppendLine();
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2017-12-21 04:43:29 +00:00
|
|
|
|
break;
|
|
|
|
|
|
}
|
2016-04-19 02:11:47 +01:00
|
|
|
|
|
2017-12-26 08:01:40 +00:00
|
|
|
|
sb.AppendFormat("Volume name: {0}", StringHandlers.CToString(besb.name, Encoding)).AppendLine();
|
2014-04-14 02:29:13 +00:00
|
|
|
|
sb.AppendFormat("{0} bytes per block", besb.block_size).AppendLine();
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
|
|
|
|
|
sb.AppendFormat("{0} blocks in volume ({1} bytes)", besb.num_blocks, besb.num_blocks * besb.block_size).
|
|
|
|
|
|
AppendLine();
|
|
|
|
|
|
|
|
|
|
|
|
sb.AppendFormat("{0} used blocks ({1} bytes)", besb.used_blocks, besb.used_blocks * besb.block_size).
|
|
|
|
|
|
AppendLine();
|
|
|
|
|
|
|
2014-04-14 02:29:13 +00:00
|
|
|
|
sb.AppendFormat("{0} bytes per i-node", besb.inode_size).AppendLine();
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2017-12-19 20:33:03 +00:00
|
|
|
|
sb.AppendFormat("{0} blocks per allocation group ({1} bytes)", besb.blocks_per_ag,
|
|
|
|
|
|
besb.blocks_per_ag * besb.block_size).AppendLine();
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2014-04-14 02:29:13 +00:00
|
|
|
|
sb.AppendFormat("{0} allocation groups in volume", besb.num_ags).AppendLine();
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2017-12-19 20:33:03 +00:00
|
|
|
|
sb.AppendFormat("Journal resides in block {0} of allocation group {1} and runs for {2} blocks ({3} bytes)",
|
|
|
|
|
|
besb.log_blocks_start, besb.log_blocks_ag, besb.log_blocks_len,
|
|
|
|
|
|
besb.log_blocks_len * besb.block_size).AppendLine();
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
|
|
|
|
|
sb.AppendFormat("Journal starts in byte {0} and ends in byte {1}", besb.log_start, besb.log_end).
|
|
|
|
|
|
AppendLine();
|
|
|
|
|
|
|
|
|
|
|
|
sb.
|
|
|
|
|
|
AppendFormat("Root folder's i-node resides in block {0} of allocation group {1} and runs for {2} blocks ({3} bytes)",
|
2018-06-22 08:08:38 +01:00
|
|
|
|
besb.root_dir_start, besb.root_dir_ag, besb.root_dir_len,
|
|
|
|
|
|
besb.root_dir_len * besb.block_size).AppendLine();
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
|
|
|
|
|
sb.
|
|
|
|
|
|
AppendFormat("Indices' i-node resides in block {0} of allocation group {1} and runs for {2} blocks ({3} bytes)",
|
|
|
|
|
|
besb.indices_start, besb.indices_ag, besb.indices_len, besb.indices_len * besb.block_size).
|
|
|
|
|
|
AppendLine();
|
2016-04-19 02:11:47 +01:00
|
|
|
|
|
2014-04-14 02:29:13 +00:00
|
|
|
|
information = sb.ToString();
|
2015-12-05 17:10:27 +00:00
|
|
|
|
|
2017-12-26 08:01:40 +00:00
|
|
|
|
XmlFsType = new FileSystemType
|
2017-12-22 08:43:22 +00:00
|
|
|
|
{
|
2020-02-29 18:03:35 +00:00
|
|
|
|
Clusters = (ulong)besb.num_blocks, ClusterSize = besb.block_size,
|
|
|
|
|
|
Dirty = besb.flags == BEFS_DIRTY,
|
|
|
|
|
|
FreeClusters = (ulong)(besb.num_blocks - besb.used_blocks), FreeClustersSpecified = true,
|
|
|
|
|
|
Type = "BeFS",
|
|
|
|
|
|
VolumeName = StringHandlers.CToString(besb.name, Encoding)
|
2017-12-22 08:43:22 +00:00
|
|
|
|
};
|
2014-04-14 02:29:13 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
2020-02-29 18:03:35 +00:00
|
|
|
|
/// <summary>Be superblock</summary>
|
2017-12-24 02:37:41 +00:00
|
|
|
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
|
|
|
|
|
struct BeSuperBlock
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>0x000, Volume name, 32 bytes</summary>
|
2018-06-22 08:08:38 +01:00
|
|
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
|
2019-04-23 01:38:33 +01:00
|
|
|
|
public readonly byte[] name;
|
2017-12-24 02:37:41 +00:00
|
|
|
|
/// <summary>0x020, "BFS1", 0x42465331</summary>
|
|
|
|
|
|
public uint magic1;
|
|
|
|
|
|
/// <summary>0x024, "BIGE", 0x42494745</summary>
|
2019-04-23 01:38:33 +01:00
|
|
|
|
public readonly uint fs_byte_order;
|
2017-12-24 02:37:41 +00:00
|
|
|
|
/// <summary>0x028, Bytes per block</summary>
|
2019-04-23 01:38:33 +01:00
|
|
|
|
public readonly uint block_size;
|
2017-12-24 02:37:41 +00:00
|
|
|
|
/// <summary>0x02C, 1 << block_shift == block_size</summary>
|
2019-04-23 01:38:33 +01:00
|
|
|
|
public readonly uint block_shift;
|
2017-12-24 02:37:41 +00:00
|
|
|
|
/// <summary>0x030, Blocks in volume</summary>
|
2019-04-23 01:38:33 +01:00
|
|
|
|
public readonly long num_blocks;
|
2017-12-24 02:37:41 +00:00
|
|
|
|
/// <summary>0x038, Used blocks in volume</summary>
|
2019-04-23 01:38:33 +01:00
|
|
|
|
public readonly long used_blocks;
|
2017-12-24 02:37:41 +00:00
|
|
|
|
/// <summary>0x040, Bytes per inode</summary>
|
2019-04-23 01:38:33 +01:00
|
|
|
|
public readonly int inode_size;
|
2017-12-24 02:37:41 +00:00
|
|
|
|
/// <summary>0x044, 0xDD121031</summary>
|
2019-04-23 01:38:33 +01:00
|
|
|
|
public readonly uint magic2;
|
2017-12-24 02:37:41 +00:00
|
|
|
|
/// <summary>0x048, Blocks per allocation group</summary>
|
2019-04-23 01:38:33 +01:00
|
|
|
|
public readonly int blocks_per_ag;
|
2017-12-24 02:37:41 +00:00
|
|
|
|
/// <summary>0x04C, 1 << ag_shift == blocks_per_ag</summary>
|
2019-04-23 01:38:33 +01:00
|
|
|
|
public readonly int ag_shift;
|
2017-12-24 02:37:41 +00:00
|
|
|
|
/// <summary>0x050, Allocation groups in volume</summary>
|
2019-04-23 01:38:33 +01:00
|
|
|
|
public readonly int num_ags;
|
2017-12-24 02:37:41 +00:00
|
|
|
|
/// <summary>0x054, 0x434c454e if clean, 0x44495254 if dirty</summary>
|
2019-04-23 01:38:33 +01:00
|
|
|
|
public readonly uint flags;
|
2017-12-24 02:37:41 +00:00
|
|
|
|
/// <summary>0x058, Allocation group of journal</summary>
|
2019-04-23 01:38:33 +01:00
|
|
|
|
public readonly int log_blocks_ag;
|
2017-12-24 02:37:41 +00:00
|
|
|
|
/// <summary>0x05C, Start block of journal, inside ag</summary>
|
2019-04-23 01:38:33 +01:00
|
|
|
|
public readonly ushort log_blocks_start;
|
2017-12-24 02:37:41 +00:00
|
|
|
|
/// <summary>0x05E, Length in blocks of journal, inside ag</summary>
|
2019-04-23 01:38:33 +01:00
|
|
|
|
public readonly ushort log_blocks_len;
|
2017-12-24 02:37:41 +00:00
|
|
|
|
/// <summary>0x060, Start of journal</summary>
|
2019-04-23 01:38:33 +01:00
|
|
|
|
public readonly long log_start;
|
2017-12-24 02:37:41 +00:00
|
|
|
|
/// <summary>0x068, End of journal</summary>
|
2019-04-23 01:38:33 +01:00
|
|
|
|
public readonly long log_end;
|
2017-12-24 02:37:41 +00:00
|
|
|
|
/// <summary>0x070, 0x15B6830E</summary>
|
2019-04-23 01:38:33 +01:00
|
|
|
|
public readonly uint magic3;
|
2017-12-24 02:37:41 +00:00
|
|
|
|
/// <summary>0x074, Allocation group where root folder's i-node resides</summary>
|
2019-04-23 01:38:33 +01:00
|
|
|
|
public readonly int root_dir_ag;
|
2017-12-24 02:37:41 +00:00
|
|
|
|
/// <summary>0x078, Start in ag of root folder's i-node</summary>
|
2019-04-23 01:38:33 +01:00
|
|
|
|
public readonly ushort root_dir_start;
|
2017-12-24 02:37:41 +00:00
|
|
|
|
/// <summary>0x07A, As this is part of inode_addr, this is 1</summary>
|
2019-04-23 01:38:33 +01:00
|
|
|
|
public readonly ushort root_dir_len;
|
2017-12-24 02:37:41 +00:00
|
|
|
|
/// <summary>0x07C, Allocation group where indices' i-node resides</summary>
|
2019-04-23 01:38:33 +01:00
|
|
|
|
public readonly int indices_ag;
|
2017-12-24 02:37:41 +00:00
|
|
|
|
/// <summary>0x080, Start in ag of indices' i-node</summary>
|
2019-04-23 01:38:33 +01:00
|
|
|
|
public readonly ushort indices_start;
|
2017-12-24 02:37:41 +00:00
|
|
|
|
/// <summary>0x082, As this is part of inode_addr, this is 1</summary>
|
2019-04-23 01:38:33 +01:00
|
|
|
|
public readonly ushort indices_len;
|
2017-12-24 02:37:41 +00:00
|
|
|
|
}
|
2014-04-14 02:29:13 +00:00
|
|
|
|
}
|
2014-04-14 01:14:20 +00:00
|
|
|
|
}
|