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 : Files-11 On-Disk Structure plugin.
|
|
|
|
|
|
//
|
|
|
|
|
|
// --[ Description ] ----------------------------------------------------------
|
|
|
|
|
|
//
|
|
|
|
|
|
// Identifies the Files-11 On-Disk Structure 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/>.
|
|
|
|
|
|
//
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
2024-05-01 04:17:32 +01:00
|
|
|
|
// Copyright © 2011-2024 Natalia Portillo
|
2016-07-28 18:13:49 +01:00
|
|
|
|
// ****************************************************************************/
|
2014-04-17 19:58:14 +00:00
|
|
|
|
|
2011-06-02 19:34:47 +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;
|
|
|
|
|
|
using Aaru.Console;
|
2020-07-20 15:43:52 +01:00
|
|
|
|
using Aaru.Helpers;
|
2022-12-15 22:21:07 +00:00
|
|
|
|
using Partition = Aaru.CommonTypes.Partition;
|
2011-06-02 19:34:47 +00:00
|
|
|
|
|
2022-11-15 15:58:43 +00:00
|
|
|
|
namespace Aaru.Filesystems;
|
|
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
// Information from VMS File System Internals by Kirby McCoy
|
|
|
|
|
|
// ISBN: 1-55558-056-4
|
|
|
|
|
|
// With some hints from http://www.decuslib.com/DECUS/vmslt97b/gnusoftware/gccaxp/7_1/vms/hm2def.h
|
|
|
|
|
|
// Expects the home block to be always in sector #1 (does not check deltas)
|
|
|
|
|
|
// Assumes a sector size of 512 bytes (VMS does on HDDs and optical drives, dunno about M.O.)
|
|
|
|
|
|
// Book only describes ODS-2. Need to test ODS-1 and ODS-5
|
|
|
|
|
|
// There is an ODS with signature "DECFILES11A", yet to be seen
|
|
|
|
|
|
// Time is a 64 bit unsigned integer, tenths of microseconds since 1858/11/17 00:00:00.
|
|
|
|
|
|
// TODO: Implement checksum
|
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
|
|
/// <summary>Implements detection of DEC's On-Disk Structure, aka the ODS filesystem</summary>
|
2022-12-07 13:07:31 +00:00
|
|
|
|
public sealed partial class ODS
|
2011-06-02 19:34:47 +00:00
|
|
|
|
{
|
2023-10-03 23:22:08 +01:00
|
|
|
|
#region IFilesystem Members
|
|
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
/// <inheritdoc />
|
|
|
|
|
|
public bool Identify(IMediaImage imagePlugin, Partition partition)
|
2014-04-14 02:29:13 +00:00
|
|
|
|
{
|
2024-05-01 04:05:22 +01:00
|
|
|
|
if(2 + partition.Start >= partition.End) return false;
|
2014-07-09 19:49:14 +01:00
|
|
|
|
|
2024-05-01 04:05:22 +01:00
|
|
|
|
if(imagePlugin.Info.SectorSize < 512) return false;
|
2014-06-07 17:32:14 +01:00
|
|
|
|
|
2023-10-03 23:22:08 +01:00
|
|
|
|
var magicB = new byte[12];
|
2022-03-06 13:29:38 +00:00
|
|
|
|
ErrorNumber errno = imagePlugin.ReadSector(1 + partition.Start, out byte[] hbSector);
|
2021-09-19 21:16:47 +01:00
|
|
|
|
|
2024-05-01 04:05:22 +01:00
|
|
|
|
if(errno != ErrorNumber.NoError) return false;
|
2014-04-14 01:14:20 +00:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
Array.Copy(hbSector, 0x1F0, magicB, 0, 12);
|
|
|
|
|
|
string magic = Encoding.ASCII.GetString(magicB);
|
2016-04-19 02:11:47 +01:00
|
|
|
|
|
2023-10-03 17:47:32 +01:00
|
|
|
|
AaruConsole.DebugWriteLine(MODULE_NAME, Localization.magic_0, magic);
|
2017-09-13 17:52:54 +01:00
|
|
|
|
|
2024-05-01 04:05:22 +01:00
|
|
|
|
if(magic is "DECFILE11A " or "DECFILE11B ") return true;
|
2017-09-13 17:52:54 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
// Optical disc
|
2024-05-01 04:05:22 +01:00
|
|
|
|
if(imagePlugin.Info.MetadataMediaType != MetadataMediaType.OpticalDisc) return false;
|
2017-09-13 17:52:54 +01:00
|
|
|
|
|
2024-05-01 04:05:22 +01:00
|
|
|
|
if(hbSector.Length < 0x400) return false;
|
2017-09-13 17:52:54 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
errno = imagePlugin.ReadSector(partition.Start, out hbSector);
|
2021-09-19 21:16:47 +01:00
|
|
|
|
|
2024-05-01 04:05:22 +01:00
|
|
|
|
if(errno != ErrorNumber.NoError) return false;
|
2017-09-13 17:52:54 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
Array.Copy(hbSector, 0x3F0, magicB, 0, 12);
|
|
|
|
|
|
magic = Encoding.ASCII.GetString(magicB);
|
2017-12-21 06:06:19 +00:00
|
|
|
|
|
2023-10-03 17:47:32 +01:00
|
|
|
|
AaruConsole.DebugWriteLine(MODULE_NAME, Localization.unaligned_magic_0, magic);
|
2017-09-13 17:52:54 +01:00
|
|
|
|
|
2022-03-16 11:47:00 +00:00
|
|
|
|
return magic is "DECFILE11A " or "DECFILE11B ";
|
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
|
|
|
|
{
|
2022-12-17 23:17:18 +00:00
|
|
|
|
encoding ??= Encoding.GetEncoding("iso-8859-1");
|
|
|
|
|
|
information = "";
|
|
|
|
|
|
metadata = new FileSystem();
|
2022-03-06 13:29:38 +00:00
|
|
|
|
|
|
|
|
|
|
var sb = new StringBuilder();
|
|
|
|
|
|
|
|
|
|
|
|
ErrorNumber errno = imagePlugin.ReadSector(1 + partition.Start, out byte[] hbSector);
|
|
|
|
|
|
|
2024-05-01 04:05:22 +01:00
|
|
|
|
if(errno != ErrorNumber.NoError) return;
|
2022-03-06 13:29:38 +00:00
|
|
|
|
|
|
|
|
|
|
HomeBlock homeblock = Marshal.ByteArrayToStructureLittleEndian<HomeBlock>(hbSector);
|
2016-04-19 02:11:47 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
// Optical disc
|
2022-12-15 22:21:07 +00:00
|
|
|
|
if(imagePlugin.Info.MetadataMediaType == MetadataMediaType.OpticalDisc &&
|
|
|
|
|
|
StringHandlers.CToString(homeblock.format) != "DECFILE11A " &&
|
2022-03-06 13:29:38 +00:00
|
|
|
|
StringHandlers.CToString(homeblock.format) != "DECFILE11B ")
|
|
|
|
|
|
{
|
2024-05-01 04:05:22 +01:00
|
|
|
|
if(hbSector.Length < 0x400) return;
|
2016-04-19 02:11:47 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
errno = imagePlugin.ReadSector(partition.Start, out byte[] tmp);
|
2021-09-19 21:16:47 +01:00
|
|
|
|
|
2024-05-01 04:05:22 +01:00
|
|
|
|
if(errno != ErrorNumber.NoError) return;
|
2016-04-19 02:11:47 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
hbSector = new byte[0x200];
|
|
|
|
|
|
Array.Copy(tmp, 0x200, hbSector, 0, 0x200);
|
2016-04-19 02:11:47 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
homeblock = Marshal.ByteArrayToStructureLittleEndian<HomeBlock>(hbSector);
|
|
|
|
|
|
|
|
|
|
|
|
if(StringHandlers.CToString(homeblock.format) != "DECFILE11A " &&
|
2017-12-19 20:33:03 +00:00
|
|
|
|
StringHandlers.CToString(homeblock.format) != "DECFILE11B ")
|
2022-03-06 13:29:38 +00:00
|
|
|
|
return;
|
|
|
|
|
|
}
|
2017-09-13 17:52:54 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
if((homeblock.struclev & 0xFF00) != 0x0200 ||
|
|
|
|
|
|
(homeblock.struclev & 0xFF) != 1 ||
|
|
|
|
|
|
StringHandlers.CToString(homeblock.format) != "DECFILE11B ")
|
2022-11-28 02:59:53 +00:00
|
|
|
|
sb.AppendLine(Localization.The_following_information_may_be_incorrect_for_this_volume);
|
2021-09-19 21:16:47 +01:00
|
|
|
|
|
2024-05-01 04:05:22 +01:00
|
|
|
|
if(homeblock.resfiles < 5 || homeblock.devtype != 0) sb.AppendLine(Localization.This_volume_may_be_corrupted);
|
2021-09-19 21:16:47 +01:00
|
|
|
|
|
2024-05-01 04:05:22 +01:00
|
|
|
|
sb.AppendFormat(Localization.Volume_format_is_0, StringHandlers.SpacePaddedToString(homeblock.format, encoding))
|
|
|
|
|
|
.AppendLine();
|
2017-09-13 17:52:54 +01:00
|
|
|
|
|
2024-05-01 04:05:22 +01:00
|
|
|
|
sb.AppendFormat(Localization.Volume_is_Level_0_revision_1,
|
|
|
|
|
|
(homeblock.struclev & 0xFF00) >> 8,
|
|
|
|
|
|
homeblock.struclev & 0xFF)
|
|
|
|
|
|
.AppendLine();
|
2017-09-13 17:52:54 +01:00
|
|
|
|
|
2022-11-28 02:59:53 +00:00
|
|
|
|
sb.AppendFormat(Localization.Lowest_structure_in_the_volume_is_Level_0_revision_1,
|
2024-05-01 04:05:22 +01:00
|
|
|
|
(homeblock.lowstruclev & 0xFF00) >> 8,
|
|
|
|
|
|
homeblock.lowstruclev & 0xFF)
|
|
|
|
|
|
.AppendLine();
|
2017-09-13 17:52:54 +01:00
|
|
|
|
|
2022-11-28 02:59:53 +00:00
|
|
|
|
sb.AppendFormat(Localization.Highest_structure_in_the_volume_is_Level_0_revision_1,
|
2024-05-01 04:05:22 +01:00
|
|
|
|
(homeblock.highstruclev & 0xFF00) >> 8,
|
|
|
|
|
|
homeblock.highstruclev & 0xFF)
|
|
|
|
|
|
.AppendLine();
|
2017-12-19 20:33:03 +00:00
|
|
|
|
|
2024-05-01 04:05:22 +01:00
|
|
|
|
sb.AppendFormat(Localization._0_sectors_per_cluster_1_bytes, homeblock.cluster, homeblock.cluster * 512)
|
|
|
|
|
|
.AppendLine();
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2024-05-01 04:05:22 +01:00
|
|
|
|
sb.AppendFormat(Localization.This_home_block_is_on_sector_0_VBN_1, homeblock.homelbn, homeblock.homevbn)
|
|
|
|
|
|
.AppendLine();
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2024-05-01 04:05:22 +01:00
|
|
|
|
sb.AppendFormat(Localization.Secondary_home_block_is_on_sector_0_VBN_1,
|
|
|
|
|
|
homeblock.alhomelbn,
|
|
|
|
|
|
homeblock.alhomevbn)
|
|
|
|
|
|
.AppendLine();
|
2022-11-28 02:59:53 +00:00
|
|
|
|
|
2024-05-01 04:05:22 +01:00
|
|
|
|
sb.AppendFormat(Localization.Volume_bitmap_starts_in_sector_0_VBN_1, homeblock.ibmaplbn, homeblock.ibmapvbn)
|
|
|
|
|
|
.AppendLine();
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2024-05-01 04:05:22 +01:00
|
|
|
|
sb.AppendFormat(Localization.Volume_bitmap_runs_for_0_sectors_1_bytes,
|
|
|
|
|
|
homeblock.ibmapsize,
|
|
|
|
|
|
homeblock.ibmapsize * 512)
|
|
|
|
|
|
.AppendLine();
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2024-05-01 04:05:22 +01:00
|
|
|
|
sb.AppendFormat(Localization.Backup_INDEXF_SYS_is_in_sector_0_VBN_1, homeblock.altidxlbn, homeblock.altidxvbn)
|
|
|
|
|
|
.AppendLine();
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2022-11-28 02:59:53 +00:00
|
|
|
|
sb.AppendFormat(Localization._0_maximum_files_on_the_volume, homeblock.maxfiles).AppendLine();
|
2023-10-03 23:22:08 +01:00
|
|
|
|
sb.AppendFormat(Localization._0_reserved_files, homeblock.resfiles).AppendLine();
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2023-10-04 17:34:40 +01:00
|
|
|
|
if(homeblock is { rvn: > 0, setcount: > 0 } && StringHandlers.CToString(homeblock.strucname) != " ")
|
2023-10-03 23:22:08 +01:00
|
|
|
|
{
|
2024-05-01 04:05:22 +01:00
|
|
|
|
sb.AppendFormat(Localization.Volume_is_0_of_1_in_set_2,
|
|
|
|
|
|
homeblock.rvn,
|
|
|
|
|
|
homeblock.setcount,
|
|
|
|
|
|
StringHandlers.SpacePaddedToString(homeblock.strucname, encoding))
|
|
|
|
|
|
.AppendLine();
|
2023-10-03 23:22:08 +01:00
|
|
|
|
}
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2022-11-28 02:59:53 +00:00
|
|
|
|
sb.AppendFormat(Localization.Volume_owner_is_0_ID_1,
|
2024-05-01 04:05:22 +01:00
|
|
|
|
StringHandlers.SpacePaddedToString(homeblock.ownername, encoding),
|
|
|
|
|
|
homeblock.volowner)
|
|
|
|
|
|
.AppendLine();
|
2022-03-06 13:29:38 +00:00
|
|
|
|
|
2024-05-01 04:05:22 +01:00
|
|
|
|
sb.AppendFormat(Localization.Volume_label_0, StringHandlers.SpacePaddedToString(homeblock.volname, encoding))
|
|
|
|
|
|
.AppendLine();
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2022-11-28 02:59:53 +00:00
|
|
|
|
sb.AppendFormat(Localization.Drive_serial_number_0, homeblock.serialnum).AppendLine();
|
|
|
|
|
|
|
2024-05-01 04:05:22 +01:00
|
|
|
|
sb.AppendFormat(Localization.Volume_was_created_on_0, DateHandlers.VmsToDateTime(homeblock.credate))
|
|
|
|
|
|
.AppendLine();
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
if(homeblock.revdate > 0)
|
2023-10-03 23:22:08 +01:00
|
|
|
|
{
|
2024-05-01 04:05:22 +01:00
|
|
|
|
sb.AppendFormat(Localization.Volume_was_last_modified_on_0, DateHandlers.VmsToDateTime(homeblock.revdate))
|
|
|
|
|
|
.AppendLine();
|
2023-10-03 23:22:08 +01:00
|
|
|
|
}
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
if(homeblock.copydate > 0)
|
2023-10-03 23:22:08 +01:00
|
|
|
|
{
|
2024-05-01 04:05:22 +01:00
|
|
|
|
sb.AppendFormat(Localization.Volume_copied_on_0, DateHandlers.VmsToDateTime(homeblock.copydate))
|
|
|
|
|
|
.AppendLine();
|
2023-10-03 23:22:08 +01:00
|
|
|
|
}
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2022-11-28 02:59:53 +00:00
|
|
|
|
sb.AppendFormat(Localization.Checksums_0_and_1, homeblock.checksum1, homeblock.checksum2).AppendLine();
|
|
|
|
|
|
sb.AppendLine(Localization.Flags);
|
2023-10-03 23:22:08 +01:00
|
|
|
|
sb.AppendFormat(Localization.Window_0, homeblock.window).AppendLine();
|
|
|
|
|
|
sb.AppendFormat(Localization.Cached_directories_0, homeblock.lru_lim).AppendLine();
|
2022-11-28 02:59:53 +00:00
|
|
|
|
sb.AppendFormat(Localization.Default_allocation_0_blocks, homeblock.extend).AppendLine();
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2024-05-01 04:05:22 +01:00
|
|
|
|
if((homeblock.volchar & 0x01) == 0x01) sb.AppendLine(Localization.Readings_should_be_verified);
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2024-05-01 04:05:22 +01:00
|
|
|
|
if((homeblock.volchar & 0x02) == 0x02) sb.AppendLine(Localization.Writings_should_be_verified);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
|
|
|
|
|
|
if((homeblock.volchar & 0x04) == 0x04)
|
2022-11-28 02:59:53 +00:00
|
|
|
|
sb.AppendLine(Localization.Files_should_be_erased_or_overwritten_when_deleted);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
|
2024-05-01 04:05:22 +01:00
|
|
|
|
if((homeblock.volchar & 0x08) == 0x08) sb.AppendLine(Localization.Highwater_mark_is_to_be_disabled);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
|
2024-05-01 04:05:22 +01:00
|
|
|
|
if((homeblock.volchar & 0x10) == 0x10) sb.AppendLine(Localization.Classification_checks_are_enabled);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
|
2022-11-28 02:59:53 +00:00
|
|
|
|
sb.AppendLine(Localization.Volume_permissions_r_read_w_write_c_create_d_delete);
|
|
|
|
|
|
sb.AppendLine(Localization.System_owner_group_world);
|
2020-02-29 18:03:35 +00:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
// System
|
|
|
|
|
|
sb.Append((homeblock.protect & 0x1000) == 0x1000 ? "-" : "r");
|
|
|
|
|
|
sb.Append((homeblock.protect & 0x2000) == 0x2000 ? "-" : "w");
|
|
|
|
|
|
sb.Append((homeblock.protect & 0x4000) == 0x4000 ? "-" : "c");
|
|
|
|
|
|
sb.Append((homeblock.protect & 0x8000) == 0x8000 ? "-" : "d");
|
|
|
|
|
|
|
|
|
|
|
|
// Owner
|
|
|
|
|
|
sb.Append((homeblock.protect & 0x100) == 0x100 ? "-" : "r");
|
|
|
|
|
|
sb.Append((homeblock.protect & 0x200) == 0x200 ? "-" : "w");
|
|
|
|
|
|
sb.Append((homeblock.protect & 0x400) == 0x400 ? "-" : "c");
|
|
|
|
|
|
sb.Append((homeblock.protect & 0x800) == 0x800 ? "-" : "d");
|
|
|
|
|
|
|
|
|
|
|
|
// Group
|
|
|
|
|
|
sb.Append((homeblock.protect & 0x10) == 0x10 ? "-" : "r");
|
|
|
|
|
|
sb.Append((homeblock.protect & 0x20) == 0x20 ? "-" : "w");
|
|
|
|
|
|
sb.Append((homeblock.protect & 0x40) == 0x40 ? "-" : "c");
|
|
|
|
|
|
sb.Append((homeblock.protect & 0x80) == 0x80 ? "-" : "d");
|
|
|
|
|
|
|
|
|
|
|
|
// World (other)
|
|
|
|
|
|
sb.Append((homeblock.protect & 0x1) == 0x1 ? "-" : "r");
|
|
|
|
|
|
sb.Append((homeblock.protect & 0x2) == 0x2 ? "-" : "w");
|
|
|
|
|
|
sb.Append((homeblock.protect & 0x4) == 0x4 ? "-" : "c");
|
|
|
|
|
|
sb.Append((homeblock.protect & 0x8) == 0x8 ? "-" : "d");
|
|
|
|
|
|
|
|
|
|
|
|
sb.AppendLine();
|
|
|
|
|
|
|
2022-11-28 02:59:53 +00:00
|
|
|
|
sb.AppendLine(Localization.Unknown_structures);
|
2023-10-03 23:22:08 +01:00
|
|
|
|
sb.AppendFormat(Localization.Security_mask_0, homeblock.sec_mask).AppendLine();
|
|
|
|
|
|
sb.AppendFormat(Localization.File_protection_0, homeblock.fileprot).AppendLine();
|
2022-11-28 02:59:53 +00:00
|
|
|
|
sb.AppendFormat(Localization.Record_protection_0, homeblock.recprot).AppendLine();
|
2022-03-06 13:29:38 +00:00
|
|
|
|
|
2022-12-17 22:41:56 +00:00
|
|
|
|
metadata = new FileSystem
|
2022-03-06 13:29:38 +00:00
|
|
|
|
{
|
2022-11-28 02:59:53 +00:00
|
|
|
|
Type = FS_TYPE,
|
2022-03-06 13:29:38 +00:00
|
|
|
|
ClusterSize = (uint)(homeblock.cluster * 512),
|
|
|
|
|
|
Clusters = partition.Size / (ulong)(homeblock.cluster * 512),
|
2022-12-17 23:17:18 +00:00
|
|
|
|
VolumeName = StringHandlers.SpacePaddedToString(homeblock.volname, encoding),
|
2022-03-06 13:29:38 +00:00
|
|
|
|
VolumeSerial = $"{homeblock.serialnum:X8}"
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2024-05-01 04:05:22 +01:00
|
|
|
|
if(homeblock.credate > 0) metadata.CreationDate = DateHandlers.VmsToDateTime(homeblock.credate);
|
2014-04-14 02:29:13 +00:00
|
|
|
|
|
2024-05-01 04:05:22 +01:00
|
|
|
|
if(homeblock.revdate > 0) metadata.ModificationDate = DateHandlers.VmsToDateTime(homeblock.revdate);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
|
|
|
|
|
|
information = sb.ToString();
|
|
|
|
|
|
}
|
2023-10-03 23:22:08 +01:00
|
|
|
|
|
|
|
|
|
|
#endregion
|
2014-04-14 01:14:20 +00:00
|
|
|
|
}
|