Use Aaru Metadata instead of CICM Metadata.

This commit is contained in:
2022-12-15 22:21:07 +00:00
parent 031f871a2d
commit cfbcde35f5
346 changed files with 11377 additions and 8653 deletions

View File

@@ -29,11 +29,11 @@
using System;
using System.Text;
using Aaru.Checksums;
using Aaru.CommonTypes;
using Aaru.CommonTypes.AaruMetadata;
using Aaru.CommonTypes.Enums;
using Aaru.CommonTypes.Interfaces;
using Aaru.Helpers;
using Schemas;
using Partition = Aaru.CommonTypes.Partition;
namespace Aaru.Filesystems;
@@ -130,23 +130,23 @@ public sealed partial class NTFS
// sb.AppendFormat("Signature 2: 0x{0:X4}", ntfs_bb.signature2).AppendLine();
XmlFsType = new FileSystemType();
Metadata = new FileSystem();
if(ntfsBb.jump[0] == 0xEB &&
ntfsBb.jump[1] > 0x4E &&
ntfsBb.jump[1] < 0x80 &&
ntfsBb.signature2 == 0xAA55)
{
XmlFsType.Bootable = true;
Metadata.Bootable = true;
string bootChk = Sha1Context.Data(ntfsBb.boot_code, out _);
sb.AppendLine(Localization.Volume_is_bootable);
sb.AppendFormat(Localization.Boot_code_SHA1_0, bootChk).AppendLine();
}
XmlFsType.ClusterSize = (uint)(ntfsBb.spc * ntfsBb.bps);
XmlFsType.Clusters = (ulong)(ntfsBb.sectors / ntfsBb.spc);
XmlFsType.VolumeSerial = $"{ntfsBb.serial_no:X16}";
XmlFsType.Type = FS_TYPE;
Metadata.ClusterSize = (uint)(ntfsBb.spc * ntfsBb.bps);
Metadata.Clusters = (ulong)(ntfsBb.sectors / ntfsBb.spc);
Metadata.VolumeSerial = $"{ntfsBb.serial_no:X16}";
Metadata.Type = FS_TYPE;
information = sb.ToString();
}

View File

@@ -28,8 +28,8 @@
using System;
using System.Text;
using Aaru.CommonTypes.AaruMetadata;
using Aaru.CommonTypes.Interfaces;
using Schemas;
namespace Aaru.Filesystems;
@@ -39,7 +39,7 @@ namespace Aaru.Filesystems;
public sealed partial class NTFS : IFilesystem
{
/// <inheritdoc />
public FileSystemType XmlFsType { get; private set; }
public FileSystem Metadata { get; private set; }
/// <inheritdoc />
public Encoding Encoding { get; private set; }
/// <inheritdoc />