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
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
//
|
2022-12-07 13:07:31 +00:00
|
|
|
|
// Filename : Info.cs
|
2016-07-28 18:13:49 +01:00
|
|
|
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
|
|
|
|
|
//
|
|
|
|
|
|
// Component : MINIX filesystem 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 <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
//
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
2022-12-03 16:07:10 +00:00
|
|
|
|
// Copyright © 2011-2023 Natalia Portillo
|
2016-07-28 18:13:49 +01:00
|
|
|
|
// ****************************************************************************/
|
2014-04-17 19:58:14 +00:00
|
|
|
|
|
2012-08-05 18:13:48 +00:00
|
|
|
|
using System;
|
2017-07-19 16:31:08 +01:00
|
|
|
|
using System.Text;
|
2022-12-15 22:21:07 +00:00
|
|
|
|
using Aaru.CommonTypes.AaruMetadata;
|
2020-02-27 00:33:26 +00:00
|
|
|
|
using Aaru.CommonTypes.Enums;
|
|
|
|
|
|
using Aaru.CommonTypes.Interfaces;
|
2022-12-07 13:07:31 +00:00
|
|
|
|
using Aaru.Helpers;
|
2022-12-15 22:21:07 +00:00
|
|
|
|
using Partition = Aaru.CommonTypes.Partition;
|
2012-08-05 18:13:48 +00:00
|
|
|
|
|
2022-11-15 15:58:43 +00:00
|
|
|
|
namespace Aaru.Filesystems;
|
|
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
// Information from the Linux kernel
|
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
|
|
/// <summary>Implements detection of the MINIX filesystem</summary>
|
2022-12-07 13:07:31 +00:00
|
|
|
|
public sealed partial class MinixFS
|
2012-08-05 18:13:48 +00:00
|
|
|
|
{
|
2023-10-03 23:22:08 +01:00
|
|
|
|
#region IFilesystem Members
|
|
|
|
|
|
|
2021-08-17 14:25:12 +01:00
|
|
|
|
/// <inheritdoc />
|
2022-03-06 13:29:38 +00:00
|
|
|
|
public bool Identify(IMediaImage imagePlugin, Partition partition)
|
2014-04-14 02:29:13 +00:00
|
|
|
|
{
|
2022-03-06 13:29:38 +00:00
|
|
|
|
uint sector = 2;
|
|
|
|
|
|
uint offset = 0;
|
|
|
|
|
|
|
2022-12-15 22:21:07 +00:00
|
|
|
|
if(imagePlugin.Info.MetadataMediaType == MetadataMediaType.OpticalDisc)
|
2014-04-14 02:29:13 +00:00
|
|
|
|
{
|
2022-03-06 13:29:38 +00:00
|
|
|
|
sector = 0;
|
|
|
|
|
|
offset = 0x400;
|
|
|
|
|
|
}
|
2017-07-25 22:23:51 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
if(sector + partition.Start >= partition.End)
|
|
|
|
|
|
return false;
|
2017-07-25 22:23:51 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
ErrorNumber errno = imagePlugin.ReadSector(sector + partition.Start, out byte[] minixSbSector);
|
2014-07-09 19:49:14 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
if(errno != ErrorNumber.NoError)
|
|
|
|
|
|
return false;
|
2021-09-19 21:16:47 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
// Optical media
|
|
|
|
|
|
if(offset > 0)
|
|
|
|
|
|
{
|
2023-10-03 23:22:08 +01:00
|
|
|
|
var tmp = new byte[0x200];
|
2022-03-06 13:29:38 +00:00
|
|
|
|
Array.Copy(minixSbSector, offset, tmp, 0, 0x200);
|
|
|
|
|
|
minixSbSector = tmp;
|
|
|
|
|
|
}
|
2017-07-25 22:23:51 +01:00
|
|
|
|
|
2023-10-03 23:22:08 +01:00
|
|
|
|
var magic = BitConverter.ToUInt16(minixSbSector, 0x010);
|
2012-08-05 18:13:48 +00:00
|
|
|
|
|
2022-03-16 11:47:00 +00:00
|
|
|
|
if(magic is MINIX_MAGIC or MINIX_MAGIC2 or MINIX2_MAGIC or MINIX2_MAGIC2 or MINIX_CIGAM or MINIX_CIGAM2
|
2023-10-03 23:22:08 +01:00
|
|
|
|
or MINIX2_CIGAM or MINIX2_CIGAM2)
|
2022-03-06 13:29:38 +00:00
|
|
|
|
return true;
|
2016-04-19 02:11:47 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
magic = BitConverter.ToUInt16(minixSbSector, 0x018); // Here should reside magic number on Minix v3
|
2017-12-19 20:33:03 +00:00
|
|
|
|
|
2022-03-16 11:47:00 +00:00
|
|
|
|
return magic is MINIX_MAGIC or MINIX2_MAGIC or MINIX3_MAGIC or MINIX_CIGAM or MINIX2_CIGAM or MINIX3_CIGAM;
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
2014-04-14 02:29:13 +00:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
/// <inheritdoc />
|
2022-12-17 22:41:56 +00:00
|
|
|
|
public void GetInformation(IMediaImage imagePlugin, Partition partition, Encoding encoding, out string information,
|
|
|
|
|
|
out FileSystem metadata)
|
2022-03-06 13:29:38 +00:00
|
|
|
|
{
|
|
|
|
|
|
information = "";
|
2022-12-17 22:41:56 +00:00
|
|
|
|
metadata = new FileSystem();
|
2014-04-14 02:29:13 +00:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
var sb = new StringBuilder();
|
2016-04-19 02:11:47 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
uint sector = 2;
|
|
|
|
|
|
uint offset = 0;
|
2012-08-05 18:13:48 +00:00
|
|
|
|
|
2022-12-15 22:21:07 +00:00
|
|
|
|
if(imagePlugin.Info.MetadataMediaType == MetadataMediaType.OpticalDisc)
|
2022-03-06 13:29:38 +00:00
|
|
|
|
{
|
|
|
|
|
|
sector = 0;
|
|
|
|
|
|
offset = 0x400;
|
|
|
|
|
|
}
|
2017-07-25 22:23:51 +01:00
|
|
|
|
|
2023-10-03 23:22:08 +01:00
|
|
|
|
var minix3 = false;
|
2022-03-06 13:29:38 +00:00
|
|
|
|
int filenamesize;
|
|
|
|
|
|
string minixVersion;
|
|
|
|
|
|
ErrorNumber errno = imagePlugin.ReadSector(sector + partition.Start, out byte[] minixSbSector);
|
2017-07-25 22:23:51 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
if(errno != ErrorNumber.NoError)
|
|
|
|
|
|
return;
|
2021-09-19 21:16:47 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
// Optical media
|
|
|
|
|
|
if(offset > 0)
|
|
|
|
|
|
{
|
2023-10-03 23:22:08 +01:00
|
|
|
|
var tmp = new byte[0x200];
|
2022-03-06 13:29:38 +00:00
|
|
|
|
Array.Copy(minixSbSector, offset, tmp, 0, 0x200);
|
|
|
|
|
|
minixSbSector = tmp;
|
|
|
|
|
|
}
|
2017-07-25 22:23:51 +01:00
|
|
|
|
|
2023-10-03 23:22:08 +01:00
|
|
|
|
var magic = BitConverter.ToUInt16(minixSbSector, 0x018);
|
2012-08-05 18:13:48 +00:00
|
|
|
|
|
2022-12-17 22:41:56 +00:00
|
|
|
|
metadata = new FileSystem();
|
2012-08-05 18:13:48 +00:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
bool littleEndian;
|
2015-12-05 17:10:27 +00:00
|
|
|
|
|
2022-03-16 11:47:00 +00:00
|
|
|
|
if(magic is MINIX3_MAGIC or MINIX3_CIGAM or MINIX2_MAGIC or MINIX2_CIGAM or MINIX_MAGIC or MINIX_CIGAM)
|
2022-03-06 13:29:38 +00:00
|
|
|
|
{
|
|
|
|
|
|
filenamesize = 60;
|
2023-10-04 09:37:55 +01:00
|
|
|
|
littleEndian = magic is not (MINIX3_CIGAM or MINIX2_CIGAM or MINIX_CIGAM);
|
2017-07-23 21:01:26 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
switch(magic)
|
2014-04-14 02:29:13 +00:00
|
|
|
|
{
|
2022-03-06 13:29:38 +00:00
|
|
|
|
case MINIX3_MAGIC:
|
|
|
|
|
|
case MINIX3_CIGAM:
|
2022-12-15 22:21:07 +00:00
|
|
|
|
minixVersion = Localization.Minix_v3_filesystem;
|
2022-12-17 22:41:56 +00:00
|
|
|
|
metadata.Type = FS_TYPE_V3;
|
2022-03-06 13:29:38 +00:00
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
case MINIX2_MAGIC:
|
|
|
|
|
|
case MINIX2_CIGAM:
|
2022-12-15 22:21:07 +00:00
|
|
|
|
minixVersion = Localization.Minix_3_v2_filesystem;
|
2022-12-17 22:41:56 +00:00
|
|
|
|
metadata.Type = FS_TYPE_V3;
|
2022-03-06 13:29:38 +00:00
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
default:
|
2022-12-15 22:21:07 +00:00
|
|
|
|
minixVersion = Localization.Minix_3_v1_filesystem;
|
2022-12-17 22:41:56 +00:00
|
|
|
|
metadata.Type = FS_TYPE_V3;
|
2022-03-06 13:29:38 +00:00
|
|
|
|
|
|
|
|
|
|
break;
|
2014-04-14 02:29:13 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
minix3 = true;
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
magic = BitConverter.ToUInt16(minixSbSector, 0x010);
|
2012-08-05 18:13:48 +00:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
switch(magic)
|
|
|
|
|
|
{
|
|
|
|
|
|
case MINIX_MAGIC:
|
2022-12-15 22:21:07 +00:00
|
|
|
|
filenamesize = 14;
|
|
|
|
|
|
minixVersion = Localization.Minix_v1_filesystem;
|
|
|
|
|
|
littleEndian = true;
|
2022-12-17 22:41:56 +00:00
|
|
|
|
metadata.Type = FS_TYPE_V1;
|
2022-03-06 13:29:38 +00:00
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
case MINIX_MAGIC2:
|
2022-12-15 22:21:07 +00:00
|
|
|
|
filenamesize = 30;
|
|
|
|
|
|
minixVersion = Localization.Minix_v1_filesystem;
|
|
|
|
|
|
littleEndian = true;
|
2022-12-17 22:41:56 +00:00
|
|
|
|
metadata.Type = FS_TYPE_V1;
|
2022-03-06 13:29:38 +00:00
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
case MINIX2_MAGIC:
|
2022-12-15 22:21:07 +00:00
|
|
|
|
filenamesize = 14;
|
|
|
|
|
|
minixVersion = Localization.Minix_v2_filesystem;
|
|
|
|
|
|
littleEndian = true;
|
2022-12-17 22:41:56 +00:00
|
|
|
|
metadata.Type = FS_TYPE_V2;
|
2022-03-06 13:29:38 +00:00
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
case MINIX2_MAGIC2:
|
2022-12-15 22:21:07 +00:00
|
|
|
|
filenamesize = 30;
|
|
|
|
|
|
minixVersion = Localization.Minix_v2_filesystem;
|
|
|
|
|
|
littleEndian = true;
|
2022-12-17 22:41:56 +00:00
|
|
|
|
metadata.Type = FS_TYPE_V2;
|
2022-03-06 13:29:38 +00:00
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
case MINIX_CIGAM:
|
2022-12-15 22:21:07 +00:00
|
|
|
|
filenamesize = 14;
|
|
|
|
|
|
minixVersion = Localization.Minix_v1_filesystem;
|
|
|
|
|
|
littleEndian = false;
|
2022-12-17 22:41:56 +00:00
|
|
|
|
metadata.Type = FS_TYPE_V1;
|
2022-03-06 13:29:38 +00:00
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
case MINIX_CIGAM2:
|
2022-12-15 22:21:07 +00:00
|
|
|
|
filenamesize = 30;
|
|
|
|
|
|
minixVersion = Localization.Minix_v1_filesystem;
|
|
|
|
|
|
littleEndian = false;
|
2022-12-17 22:41:56 +00:00
|
|
|
|
metadata.Type = FS_TYPE_V1;
|
2022-03-06 13:29:38 +00:00
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
case MINIX2_CIGAM:
|
2022-12-15 22:21:07 +00:00
|
|
|
|
filenamesize = 14;
|
|
|
|
|
|
minixVersion = Localization.Minix_v2_filesystem;
|
|
|
|
|
|
littleEndian = false;
|
2022-12-17 22:41:56 +00:00
|
|
|
|
metadata.Type = FS_TYPE_V2;
|
2022-03-06 13:29:38 +00:00
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
case MINIX2_CIGAM2:
|
2022-12-15 22:21:07 +00:00
|
|
|
|
filenamesize = 30;
|
|
|
|
|
|
minixVersion = Localization.Minix_v2_filesystem;
|
|
|
|
|
|
littleEndian = false;
|
2022-12-17 22:41:56 +00:00
|
|
|
|
metadata.Type = FS_TYPE_V2;
|
2022-03-06 13:29:38 +00:00
|
|
|
|
|
|
|
|
|
|
break;
|
2023-10-03 23:22:08 +01:00
|
|
|
|
default:
|
|
|
|
|
|
return;
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2017-07-25 02:48:04 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
if(minix3)
|
|
|
|
|
|
{
|
2023-10-03 23:22:08 +01:00
|
|
|
|
SuperBlock3 mnxSb = littleEndian
|
|
|
|
|
|
? Marshal.ByteArrayToStructureLittleEndian<SuperBlock3>(minixSbSector)
|
2022-03-06 13:29:38 +00:00
|
|
|
|
: Marshal.ByteArrayToStructureBigEndian<SuperBlock3>(minixSbSector);
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2023-10-04 17:34:40 +01:00
|
|
|
|
if(magic != MINIX3_MAGIC && magic != MINIX3_CIGAM)
|
2022-03-06 13:29:38 +00:00
|
|
|
|
mnxSb.s_blocksize = 1024;
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
sb.AppendLine(minixVersion);
|
2022-11-28 02:59:53 +00:00
|
|
|
|
sb.AppendFormat(Localization._0_chars_in_filename, filenamesize).AppendLine();
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
if(mnxSb.s_zones > 0) // On V2
|
2023-10-03 23:22:08 +01:00
|
|
|
|
{
|
2023-10-01 04:00:02 +01:00
|
|
|
|
sb.AppendFormat(Localization._0_zones_in_volume_1_bytes, mnxSb.s_zones, mnxSb.s_zones * 1024).
|
2022-11-28 02:59:53 +00:00
|
|
|
|
AppendLine();
|
2023-10-03 23:22:08 +01:00
|
|
|
|
}
|
2022-03-06 13:29:38 +00:00
|
|
|
|
else
|
2023-10-03 23:22:08 +01:00
|
|
|
|
{
|
2023-10-01 04:00:02 +01:00
|
|
|
|
sb.AppendFormat(Localization._0_zones_in_volume_1_bytes, mnxSb.s_nzones, mnxSb.s_nzones * 1024).
|
2022-11-28 02:59:53 +00:00
|
|
|
|
AppendLine();
|
2023-10-03 23:22:08 +01:00
|
|
|
|
}
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2023-10-03 23:22:08 +01:00
|
|
|
|
sb.AppendFormat(Localization._0_bytes_block, mnxSb.s_blocksize).AppendLine();
|
2023-10-01 04:00:02 +01:00
|
|
|
|
sb.AppendFormat(Localization._0_inodes_in_volume, mnxSb.s_ninodes).AppendLine();
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2022-11-28 02:59:53 +00:00
|
|
|
|
sb.AppendFormat(Localization._0_blocks_on_inode_map_1_bytes, mnxSb.s_imap_blocks,
|
2023-10-04 17:34:40 +01:00
|
|
|
|
mnxSb.s_imap_blocks * mnxSb.s_blocksize).
|
|
|
|
|
|
AppendLine();
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2022-11-28 02:59:53 +00:00
|
|
|
|
sb.AppendFormat(Localization._0_blocks_on_zone_map_1_bytes, mnxSb.s_zmap_blocks,
|
2023-10-04 17:34:40 +01:00
|
|
|
|
mnxSb.s_zmap_blocks * mnxSb.s_blocksize).
|
|
|
|
|
|
AppendLine();
|
2015-12-05 17:10:27 +00:00
|
|
|
|
|
2022-11-28 02:59:53 +00:00
|
|
|
|
sb.AppendFormat(Localization.First_data_zone_0, mnxSb.s_firstdatazone).AppendLine();
|
2012-08-05 18:13:48 +00:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
//sb.AppendFormat("log2 of blocks/zone: {0}", mnx_sb.s_log_zone_size).AppendLine(); // Apparently 0
|
2023-10-03 23:22:08 +01:00
|
|
|
|
sb.AppendFormat(Localization._0_bytes_maximum_per_file, mnxSb.s_max_size).AppendLine();
|
2022-11-28 02:59:53 +00:00
|
|
|
|
sb.AppendFormat(Localization.On_disk_filesystem_version_0, mnxSb.s_disk_version).AppendLine();
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2022-12-17 22:41:56 +00:00
|
|
|
|
metadata.ClusterSize = mnxSb.s_blocksize;
|
|
|
|
|
|
metadata.Clusters = mnxSb.s_zones > 0 ? mnxSb.s_zones : mnxSb.s_nzones;
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
2023-10-03 23:22:08 +01:00
|
|
|
|
SuperBlock mnxSb = littleEndian
|
|
|
|
|
|
? Marshal.ByteArrayToStructureLittleEndian<SuperBlock>(minixSbSector)
|
2022-03-06 13:29:38 +00:00
|
|
|
|
: Marshal.ByteArrayToStructureBigEndian<SuperBlock>(minixSbSector);
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
sb.AppendLine(minixVersion);
|
2022-11-28 02:59:53 +00:00
|
|
|
|
sb.AppendFormat(Localization._0_chars_in_filename, filenamesize).AppendLine();
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
if(mnxSb.s_zones > 0) // On V2
|
2023-10-03 23:22:08 +01:00
|
|
|
|
{
|
2023-10-01 04:00:02 +01:00
|
|
|
|
sb.AppendFormat(Localization._0_zones_in_volume_1_bytes, mnxSb.s_zones, mnxSb.s_zones * 1024).
|
2022-11-28 02:59:53 +00:00
|
|
|
|
AppendLine();
|
2023-10-03 23:22:08 +01:00
|
|
|
|
}
|
2022-03-06 13:29:38 +00:00
|
|
|
|
else
|
2023-10-03 23:22:08 +01:00
|
|
|
|
{
|
2023-10-01 04:00:02 +01:00
|
|
|
|
sb.AppendFormat(Localization._0_zones_in_volume_1_bytes, mnxSb.s_nzones, mnxSb.s_nzones * 1024).
|
2022-11-28 02:59:53 +00:00
|
|
|
|
AppendLine();
|
2023-10-03 23:22:08 +01:00
|
|
|
|
}
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2023-10-01 04:00:02 +01:00
|
|
|
|
sb.AppendFormat(Localization._0_inodes_in_volume, mnxSb.s_ninodes).AppendLine();
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2022-11-28 02:59:53 +00:00
|
|
|
|
sb.AppendFormat(Localization._0_blocks_on_inode_map_1_bytes, mnxSb.s_imap_blocks,
|
2023-10-04 17:34:40 +01:00
|
|
|
|
mnxSb.s_imap_blocks * 1024).
|
|
|
|
|
|
AppendLine();
|
2018-06-22 08:08:38 +01:00
|
|
|
|
|
2022-11-28 02:59:53 +00:00
|
|
|
|
sb.AppendFormat(Localization._0_blocks_on_zone_map_1_bytes, mnxSb.s_zmap_blocks,
|
2023-10-04 17:34:40 +01:00
|
|
|
|
mnxSb.s_zmap_blocks * 1024).
|
|
|
|
|
|
AppendLine();
|
2014-04-14 02:29:13 +00:00
|
|
|
|
|
2022-11-28 02:59:53 +00:00
|
|
|
|
sb.AppendFormat(Localization.First_data_zone_0, mnxSb.s_firstdatazone).AppendLine();
|
2017-12-24 02:37:41 +00:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
//sb.AppendFormat("log2 of blocks/zone: {0}", mnx_sb.s_log_zone_size).AppendLine(); // Apparently 0
|
2022-11-28 02:59:53 +00:00
|
|
|
|
sb.AppendFormat(Localization._0_bytes_maximum_per_file, mnxSb.s_max_size).AppendLine();
|
2023-10-03 23:22:08 +01:00
|
|
|
|
sb.AppendFormat(Localization.Filesystem_state_0, mnxSb.s_state).AppendLine();
|
2022-12-17 22:41:56 +00:00
|
|
|
|
metadata.ClusterSize = 1024;
|
|
|
|
|
|
metadata.Clusters = mnxSb.s_zones > 0 ? mnxSb.s_zones : mnxSb.s_nzones;
|
2017-12-24 02:37:41 +00:00
|
|
|
|
}
|
2022-03-06 13:29:38 +00:00
|
|
|
|
|
|
|
|
|
|
information = sb.ToString();
|
|
|
|
|
|
}
|
2023-10-03 23:22:08 +01:00
|
|
|
|
|
|
|
|
|
|
#endregion
|
2017-12-19 20:33:03 +00:00
|
|
|
|
}
|