2017-08-16 15:44:50 +01:00
|
|
|
|
// /***************************************************************************
|
2020-02-27 12:31:25 +00:00
|
|
|
|
// Aaru Data Preservation Suite
|
2017-08-16 15:44:50 +01:00
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
//
|
2022-12-07 13:07:31 +00:00
|
|
|
|
// Filename : Info.cs
|
2017-08-16 15:44:50 +01:00
|
|
|
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
|
|
|
|
|
//
|
2017-12-19 03:50:57 +00:00
|
|
|
|
// Component : Random Block File filesystem plugin
|
2017-08-16 15:44:50 +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/>.
|
|
|
|
|
|
//
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
2024-12-19 10:45:18 +00:00
|
|
|
|
// Copyright © 2011-2025 Natalia Portillo
|
2017-08-16 15:44:50 +01:00
|
|
|
|
// ****************************************************************************/
|
2017-08-16 15:45:37 +01:00
|
|
|
|
|
|
|
|
|
|
using System.Text;
|
2022-12-15 22:21:07 +00:00
|
|
|
|
using Aaru.CommonTypes.AaruMetadata;
|
2021-09-19 21:16:47 +01:00
|
|
|
|
using Aaru.CommonTypes.Enums;
|
2020-02-27 00:33:26 +00:00
|
|
|
|
using Aaru.CommonTypes.Interfaces;
|
2020-07-20 15:43:52 +01:00
|
|
|
|
using Aaru.Helpers;
|
2025-08-17 05:50:25 +01:00
|
|
|
|
using Aaru.Logging;
|
2022-12-15 22:21:07 +00:00
|
|
|
|
using Partition = Aaru.CommonTypes.Partition;
|
2017-08-16 15:45:37 +01:00
|
|
|
|
|
2022-11-15 15:58:43 +00:00
|
|
|
|
namespace Aaru.Filesystems;
|
|
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
/// <inheritdoc />
|
|
|
|
|
|
/// <summary>Implements detection of the Locus filesystem</summary>
|
2024-05-01 21:42:49 +01:00
|
|
|
|
public sealed partial class RBF
|
2017-08-16 15:44:50 +01: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)
|
2017-08-16 15:44:50 +01:00
|
|
|
|
{
|
2024-05-01 04:05:22 +01:00
|
|
|
|
if(imagePlugin.Info.SectorSize < 256) return false;
|
2022-03-06 13:29:38 +00:00
|
|
|
|
|
|
|
|
|
|
// Documentation says ID should be sector 0
|
|
|
|
|
|
// I've found that OS-9/X68000 has it on sector 4
|
|
|
|
|
|
// I've read OS-9/Apple2 has it on sector 15
|
2023-10-04 17:34:40 +01:00
|
|
|
|
foreach(int i in new[]
|
2024-05-01 04:05:22 +01:00
|
|
|
|
{
|
|
|
|
|
|
0, 4, 15
|
|
|
|
|
|
})
|
2017-08-16 15:45:37 +01:00
|
|
|
|
{
|
2025-08-17 05:50:25 +01:00
|
|
|
|
ulong location = (ulong)i;
|
2017-08-16 15:45:37 +01:00
|
|
|
|
|
2025-08-17 05:50:25 +01:00
|
|
|
|
uint sbSize = (uint)(Marshal.SizeOf<IdSector>() / imagePlugin.Info.SectorSize);
|
2017-08-16 15:45:37 +01:00
|
|
|
|
|
2024-05-01 04:05:22 +01:00
|
|
|
|
if(Marshal.SizeOf<IdSector>() % imagePlugin.Info.SectorSize != 0) sbSize++;
|
2017-08-16 15:45:37 +01:00
|
|
|
|
|
2024-05-01 04:05:22 +01:00
|
|
|
|
if(partition.Start + location + sbSize >= imagePlugin.Info.Sectors) break;
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
ErrorNumber errno = imagePlugin.ReadSectors(partition.Start + location, sbSize, out byte[] sector);
|
2017-11-08 17:05:00 +00:00
|
|
|
|
|
2024-05-01 04:05:22 +01:00
|
|
|
|
if(errno != ErrorNumber.NoError) return false;
|
2021-09-19 21:16:47 +01:00
|
|
|
|
|
2024-05-01 04:05:22 +01:00
|
|
|
|
if(sector.Length < Marshal.SizeOf<IdSector>()) return false;
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2025-10-21 03:41:27 +01:00
|
|
|
|
IdSector rbfSb = Marshal.ByteArrayToStructureBigEndianGenerated<IdSector>(sector);
|
|
|
|
|
|
NewIdSector rbf9000Sb = Marshal.ByteArrayToStructureBigEndianGenerated<NewIdSector>(sector);
|
2017-08-16 15:45:37 +01:00
|
|
|
|
|
2025-08-17 06:11:22 +01:00
|
|
|
|
AaruLogging.Debug(MODULE_NAME,
|
2024-05-01 04:05:22 +01:00
|
|
|
|
Localization.magic_at_0_equals_1_or_2_expected_3_or_4,
|
|
|
|
|
|
location,
|
|
|
|
|
|
rbfSb.dd_sync,
|
|
|
|
|
|
rbf9000Sb.rid_sync,
|
|
|
|
|
|
RBF_SYNC,
|
|
|
|
|
|
RBF_CNYS);
|
2017-08-16 15:45:37 +01:00
|
|
|
|
|
2024-05-01 04:05:22 +01:00
|
|
|
|
if(rbfSb.dd_sync == RBF_SYNC || rbf9000Sb.rid_sync is RBF_SYNC or RBF_CNYS) return true;
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
2017-08-16 15:45:37 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
return false;
|
|
|
|
|
|
}
|
2017-08-16 15:45:37 +01: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
|
|
|
|
{
|
2022-12-17 23:17:18 +00:00
|
|
|
|
encoding ??= Encoding.GetEncoding("iso-8859-15");
|
|
|
|
|
|
information = "";
|
|
|
|
|
|
metadata = new FileSystem();
|
2022-03-06 13:29:38 +00:00
|
|
|
|
|
2024-05-01 04:05:22 +01:00
|
|
|
|
if(imagePlugin.Info.SectorSize < 256) return;
|
2017-08-16 15:45:37 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
var rbfSb = new IdSector();
|
|
|
|
|
|
var rbf9000Sb = new NewIdSector();
|
|
|
|
|
|
|
2023-10-04 17:34:40 +01:00
|
|
|
|
foreach(int i in new[]
|
2024-05-01 04:05:22 +01:00
|
|
|
|
{
|
|
|
|
|
|
0, 4, 15
|
|
|
|
|
|
})
|
2017-08-16 15:45:37 +01:00
|
|
|
|
{
|
2025-08-17 05:50:25 +01:00
|
|
|
|
ulong location = (ulong)i;
|
|
|
|
|
|
uint sbSize = (uint)(Marshal.SizeOf<IdSector>() / imagePlugin.Info.SectorSize);
|
2017-08-16 15:45:37 +01:00
|
|
|
|
|
2024-05-01 04:05:22 +01:00
|
|
|
|
if(Marshal.SizeOf<IdSector>() % imagePlugin.Info.SectorSize != 0) sbSize++;
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
ErrorNumber errno = imagePlugin.ReadSectors(partition.Start + location, sbSize, out byte[] sector);
|
2017-08-16 15:45:37 +01:00
|
|
|
|
|
2024-05-01 04:05:22 +01:00
|
|
|
|
if(errno != ErrorNumber.NoError) return;
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2024-05-01 04:05:22 +01:00
|
|
|
|
if(sector.Length < Marshal.SizeOf<IdSector>()) return;
|
2017-08-16 15:45:37 +01:00
|
|
|
|
|
2025-10-21 03:41:27 +01:00
|
|
|
|
rbfSb = Marshal.ByteArrayToStructureBigEndianGenerated<IdSector>(sector);
|
|
|
|
|
|
rbf9000Sb = Marshal.ByteArrayToStructureBigEndianGenerated<NewIdSector>(sector);
|
2021-09-19 21:16:47 +01:00
|
|
|
|
|
2025-08-17 06:11:22 +01:00
|
|
|
|
AaruLogging.Debug(MODULE_NAME,
|
2024-05-01 04:05:22 +01:00
|
|
|
|
Localization.magic_at_0_equals_1_or_2_expected_3_or_4,
|
|
|
|
|
|
location,
|
|
|
|
|
|
rbfSb.dd_sync,
|
|
|
|
|
|
rbf9000Sb.rid_sync,
|
|
|
|
|
|
RBF_SYNC,
|
|
|
|
|
|
RBF_CNYS);
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2024-05-01 04:05:22 +01:00
|
|
|
|
if(rbfSb.dd_sync == RBF_SYNC || rbf9000Sb.rid_sync is RBF_SYNC or RBF_CNYS) break;
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
2017-08-16 15:45:37 +01:00
|
|
|
|
|
2024-05-01 04:05:22 +01:00
|
|
|
|
if(rbfSb.dd_sync != RBF_SYNC && rbf9000Sb.rid_sync != RBF_SYNC && rbf9000Sb.rid_sync != RBF_CNYS) return;
|
2017-08-16 15:45:37 +01:00
|
|
|
|
|
2024-05-01 04:05:22 +01:00
|
|
|
|
if(rbf9000Sb.rid_sync == RBF_CNYS) rbf9000Sb = (NewIdSector)Marshal.SwapStructureMembersEndian(rbf9000Sb);
|
2017-08-16 15:45:37 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
var sb = new StringBuilder();
|
2017-08-16 15:45:37 +01:00
|
|
|
|
|
2022-11-28 02:59:53 +00:00
|
|
|
|
sb.AppendLine(Localization.OS_9_Random_Block_File);
|
2017-08-16 15:45:37 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
if(rbf9000Sb.rid_sync == RBF_SYNC)
|
|
|
|
|
|
{
|
2023-10-03 23:22:08 +01:00
|
|
|
|
sb.AppendFormat(Localization.Volume_ID_0_X8, rbf9000Sb.rid_diskid).AppendLine();
|
|
|
|
|
|
sb.AppendFormat(Localization._0_blocks_in_volume, rbf9000Sb.rid_totblocks).AppendLine();
|
|
|
|
|
|
sb.AppendFormat(Localization._0_cylinders, rbf9000Sb.rid_cylinders).AppendLine();
|
2022-11-28 02:59:53 +00:00
|
|
|
|
sb.AppendFormat(Localization._0_blocks_in_cylinder_zero, rbf9000Sb.rid_cyl0size).AppendLine();
|
2023-10-03 23:22:08 +01:00
|
|
|
|
sb.AppendFormat(Localization._0_blocks_per_cylinder, rbf9000Sb.rid_cylsize).AppendLine();
|
|
|
|
|
|
sb.AppendFormat(Localization._0_heads, rbf9000Sb.rid_heads).AppendLine();
|
|
|
|
|
|
sb.AppendFormat(Localization._0_bytes_per_block, rbf9000Sb.rid_blocksize).AppendLine();
|
2022-03-06 13:29:38 +00:00
|
|
|
|
|
|
|
|
|
|
// TODO: Convert to flags?
|
2023-10-03 23:22:08 +01:00
|
|
|
|
sb.AppendLine((rbf9000Sb.rid_format & 0x01) == 0x01
|
|
|
|
|
|
? Localization.Disk_is_double_sided
|
2022-11-28 02:59:53 +00:00
|
|
|
|
: Localization.Disk_is_single_sided);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
|
2023-10-03 23:22:08 +01:00
|
|
|
|
sb.AppendLine((rbf9000Sb.rid_format & 0x02) == 0x02
|
|
|
|
|
|
? Localization.Disk_is_double_density
|
2022-11-28 02:59:53 +00:00
|
|
|
|
: Localization.Disk_is_single_density);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
|
|
|
|
|
|
if((rbf9000Sb.rid_format & 0x10) == 0x10)
|
2022-11-28 02:59:53 +00:00
|
|
|
|
sb.AppendLine(Localization.Disk_is_384_TPI);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
else if((rbf9000Sb.rid_format & 0x08) == 0x08)
|
2022-11-28 02:59:53 +00:00
|
|
|
|
sb.AppendLine(Localization.Disk_is_192_TPI);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
else if((rbf9000Sb.rid_format & 0x04) == 0x04)
|
2022-11-28 02:59:53 +00:00
|
|
|
|
sb.AppendLine(Localization.Disk_is_96_TPI_or_135_TPI);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
else
|
2022-11-28 02:59:53 +00:00
|
|
|
|
sb.AppendLine(Localization.Disk_is_48_TPI);
|
2017-08-16 15:45:37 +01:00
|
|
|
|
|
2022-11-28 02:59:53 +00:00
|
|
|
|
sb.AppendFormat(Localization.Allocation_bitmap_descriptor_starts_at_block_0,
|
2024-05-01 04:05:22 +01:00
|
|
|
|
rbf9000Sb.rid_bitmap == 0 ? 1 : rbf9000Sb.rid_bitmap)
|
|
|
|
|
|
.AppendLine();
|
2017-08-16 15:45:37 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
if(rbf9000Sb.rid_firstboot > 0)
|
2023-10-03 23:22:08 +01:00
|
|
|
|
{
|
2024-05-01 04:05:22 +01:00
|
|
|
|
sb.AppendFormat(Localization.Debugger_descriptor_starts_at_block_0, rbf9000Sb.rid_firstboot)
|
|
|
|
|
|
.AppendLine();
|
2023-10-03 23:22:08 +01:00
|
|
|
|
}
|
2017-08-16 15:45:37 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
if(rbf9000Sb.rid_bootfile > 0)
|
2023-10-03 23:22:08 +01:00
|
|
|
|
{
|
2024-05-01 04:05:22 +01:00
|
|
|
|
sb.AppendFormat(Localization.Boot_file_descriptor_starts_at_block_0, rbf9000Sb.rid_bootfile)
|
|
|
|
|
|
.AppendLine();
|
2023-10-03 23:22:08 +01:00
|
|
|
|
}
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2024-05-01 04:05:22 +01:00
|
|
|
|
sb.AppendFormat(Localization.Root_directory_descriptor_starts_at_block_0, rbf9000Sb.rid_rootdir)
|
|
|
|
|
|
.AppendLine();
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2024-05-01 04:05:22 +01:00
|
|
|
|
sb.AppendFormat(Localization.Disk_is_owned_by_group_0_user_1, rbf9000Sb.rid_group, rbf9000Sb.rid_owner)
|
|
|
|
|
|
.AppendLine();
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2024-05-01 04:05:22 +01:00
|
|
|
|
sb.AppendFormat(Localization.Volume_was_created_on_0, DateHandlers.UnixToDateTime(rbf9000Sb.rid_ctime))
|
|
|
|
|
|
.AppendLine();
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2022-11-28 02:59:53 +00:00
|
|
|
|
sb.AppendFormat(Localization.Volume_identification_block_was_last_written_on_0,
|
2024-05-01 04:05:22 +01:00
|
|
|
|
DateHandlers.UnixToDateTime(rbf9000Sb.rid_mtime))
|
|
|
|
|
|
.AppendLine();
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2024-05-01 04:05:22 +01:00
|
|
|
|
sb.AppendFormat(Localization.Volume_name_0, StringHandlers.CToString(rbf9000Sb.rid_name, encoding))
|
|
|
|
|
|
.AppendLine();
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2022-12-17 22:41:56 +00:00
|
|
|
|
metadata = new FileSystem
|
2022-03-06 13:29:38 +00:00
|
|
|
|
{
|
2022-12-15 22:21:07 +00:00
|
|
|
|
Type = FS_TYPE,
|
|
|
|
|
|
Bootable = rbf9000Sb.rid_bootfile > 0,
|
|
|
|
|
|
ClusterSize = rbf9000Sb.rid_blocksize,
|
|
|
|
|
|
Clusters = rbf9000Sb.rid_totblocks,
|
|
|
|
|
|
CreationDate = DateHandlers.UnixToDateTime(rbf9000Sb.rid_ctime),
|
|
|
|
|
|
ModificationDate = DateHandlers.UnixToDateTime(rbf9000Sb.rid_mtime),
|
2022-12-17 23:17:18 +00:00
|
|
|
|
VolumeName = StringHandlers.CToString(rbf9000Sb.rid_name, encoding),
|
2022-12-15 22:21:07 +00:00
|
|
|
|
VolumeSerial = $"{rbf9000Sb.rid_diskid:X8}"
|
2022-03-06 13:29:38 +00:00
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
2023-10-03 23:22:08 +01:00
|
|
|
|
sb.AppendFormat(Localization.Volume_ID_0_X4, rbfSb.dd_dsk).AppendLine();
|
|
|
|
|
|
sb.AppendFormat(Localization._0_blocks_in_volume, LSNToUInt32(rbfSb.dd_tot)).AppendLine();
|
|
|
|
|
|
sb.AppendFormat(Localization._0_tracks, rbfSb.dd_tks).AppendLine();
|
2022-11-28 02:59:53 +00:00
|
|
|
|
sb.AppendFormat(Localization._0_sectors_per_track, rbfSb.dd_spt).AppendLine();
|
2023-10-03 23:22:08 +01:00
|
|
|
|
sb.AppendFormat(Localization._0_bytes_per_sector, 256 << rbfSb.dd_lsnsize).AppendLine();
|
2022-03-06 13:29:38 +00:00
|
|
|
|
|
2024-05-01 04:05:22 +01:00
|
|
|
|
sb.AppendFormat(Localization._0_sectors_per_cluster_1_bytes,
|
|
|
|
|
|
rbfSb.dd_bit,
|
|
|
|
|
|
rbfSb.dd_bit * (256 << rbfSb.dd_lsnsize))
|
|
|
|
|
|
.AppendLine();
|
2022-03-06 13:29:38 +00:00
|
|
|
|
|
|
|
|
|
|
// TODO: Convert to flags?
|
2023-10-03 23:22:08 +01:00
|
|
|
|
sb.AppendLine((rbfSb.dd_fmt & 0x01) == 0x01
|
|
|
|
|
|
? Localization.Disk_is_double_sided
|
2022-11-28 02:59:53 +00:00
|
|
|
|
: Localization.Disk_is_single_sided);
|
|
|
|
|
|
|
2023-10-03 23:22:08 +01:00
|
|
|
|
sb.AppendLine((rbfSb.dd_fmt & 0x02) == 0x02
|
|
|
|
|
|
? Localization.Disk_is_double_density
|
2022-11-28 02:59:53 +00:00
|
|
|
|
: Localization.Disk_is_single_density);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
|
|
|
|
|
|
if((rbfSb.dd_fmt & 0x10) == 0x10)
|
2022-11-28 02:59:53 +00:00
|
|
|
|
sb.AppendLine(Localization.Disk_is_384_TPI);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
else if((rbfSb.dd_fmt & 0x08) == 0x08)
|
2022-11-28 02:59:53 +00:00
|
|
|
|
sb.AppendLine(Localization.Disk_is_192_TPI);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
else if((rbfSb.dd_fmt & 0x04) == 0x04)
|
2022-11-28 02:59:53 +00:00
|
|
|
|
sb.AppendLine(Localization.Disk_is_96_TPI_or_135_TPI);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
else
|
2022-11-28 02:59:53 +00:00
|
|
|
|
sb.AppendLine(Localization.Disk_is_48_TPI);
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2022-11-28 02:59:53 +00:00
|
|
|
|
sb.AppendFormat(Localization.Allocation_bitmap_descriptor_starts_at_block_0,
|
2024-05-01 04:05:22 +01:00
|
|
|
|
rbfSb.dd_maplsn == 0 ? 1 : rbfSb.dd_maplsn)
|
|
|
|
|
|
.AppendLine();
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2022-11-28 02:59:53 +00:00
|
|
|
|
sb.AppendFormat(Localization._0_bytes_in_allocation_bitmap, rbfSb.dd_map).AppendLine();
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2023-10-04 17:34:40 +01:00
|
|
|
|
if(LSNToUInt32(rbfSb.dd_bt) > 0 && rbfSb.dd_bsz > 0)
|
2023-10-03 23:22:08 +01:00
|
|
|
|
{
|
2024-05-01 04:05:22 +01:00
|
|
|
|
sb.AppendFormat(Localization.Boot_file_starts_at_block_0_and_has_1_bytes,
|
|
|
|
|
|
LSNToUInt32(rbfSb.dd_bt),
|
|
|
|
|
|
rbfSb.dd_bsz)
|
|
|
|
|
|
.AppendLine();
|
2023-10-03 23:22:08 +01:00
|
|
|
|
}
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2024-05-01 04:05:22 +01:00
|
|
|
|
sb.AppendFormat(Localization.Root_directory_descriptor_starts_at_block_0, LSNToUInt32(rbfSb.dd_dir))
|
|
|
|
|
|
.AppendLine();
|
2022-11-28 02:59:53 +00:00
|
|
|
|
|
|
|
|
|
|
sb.AppendFormat(Localization.Disk_is_owned_by_user_0, rbfSb.dd_own).AppendLine();
|
|
|
|
|
|
|
2024-05-01 04:05:22 +01:00
|
|
|
|
sb.AppendFormat(Localization.Volume_was_created_on_0, DateHandlers.Os9ToDateTime(rbfSb.dd_dat))
|
|
|
|
|
|
.AppendLine();
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2022-11-28 02:59:53 +00:00
|
|
|
|
sb.AppendFormat(Localization.Volume_attributes_0, rbfSb.dd_att).AppendLine();
|
2022-12-17 23:17:18 +00:00
|
|
|
|
sb.AppendFormat(Localization.Volume_name_0, StringHandlers.CToString(rbfSb.dd_nam, encoding)).AppendLine();
|
2017-08-16 15:45:37 +01:00
|
|
|
|
|
2024-05-01 04:05:22 +01:00
|
|
|
|
sb.AppendFormat(Localization.Path_descriptor_options_0, StringHandlers.CToString(rbfSb.dd_opt, encoding))
|
|
|
|
|
|
.AppendLine();
|
2022-03-06 13:29:38 +00:00
|
|
|
|
|
2022-12-17 22:41:56 +00:00
|
|
|
|
metadata = new FileSystem
|
2017-08-16 15:45:37 +01:00
|
|
|
|
{
|
2022-12-15 22:21:07 +00:00
|
|
|
|
Type = FS_TYPE,
|
|
|
|
|
|
Bootable = LSNToUInt32(rbfSb.dd_bt) > 0 && rbfSb.dd_bsz > 0,
|
|
|
|
|
|
ClusterSize = (uint)(rbfSb.dd_bit * (256 << rbfSb.dd_lsnsize)),
|
|
|
|
|
|
Clusters = LSNToUInt32(rbfSb.dd_tot),
|
|
|
|
|
|
CreationDate = DateHandlers.Os9ToDateTime(rbfSb.dd_dat),
|
2022-12-17 23:17:18 +00:00
|
|
|
|
VolumeName = StringHandlers.CToString(rbfSb.dd_nam, encoding),
|
2022-12-15 22:21:07 +00:00
|
|
|
|
VolumeSerial = $"{rbfSb.dd_dsk:X4}"
|
2022-03-06 13:29:38 +00:00
|
|
|
|
};
|
2017-08-16 15:45:37 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
information = sb.ToString();
|
|
|
|
|
|
}
|
2023-10-03 23:22:08 +01:00
|
|
|
|
|
|
|
|
|
|
#endregion
|
2017-08-16 15:45:37 +01:00
|
|
|
|
}
|