mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
Refactor, pass whole partition structure to filesystems.
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using DiscImageChef.CommonTypes;
|
||||
using DiscImageChef.ImagePlugins;
|
||||
|
||||
namespace DiscImageChef.Filesystems.AppleDOS
|
||||
@@ -79,10 +80,10 @@ namespace DiscImageChef.Filesystems.AppleDOS
|
||||
CurrentEncoding = new Claunia.Encoding.LisaRoman();
|
||||
}
|
||||
|
||||
public AppleDOS(ImagePlugin imagePlugin, ulong partitionStart, ulong partitionEnd, Encoding encoding)
|
||||
public AppleDOS(ImagePlugin imagePlugin, Partition partition, Encoding encoding)
|
||||
{
|
||||
device = imagePlugin;
|
||||
start = partitionStart;
|
||||
start = partition.PartitionStartSector;
|
||||
Name = "Apple DOS File System";
|
||||
PluginUUID = new Guid("8658A1E9-B2E7-4BCC-9638-157A31B0A700\n");
|
||||
if(encoding == null) // TODO: Until Apple ][ encoding is implemented
|
||||
|
||||
@@ -33,18 +33,19 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using DiscImageChef.CommonTypes;
|
||||
using DiscImageChef.ImagePlugins;
|
||||
|
||||
namespace DiscImageChef.Filesystems.AppleDOS
|
||||
{
|
||||
public partial class AppleDOS : Filesystem
|
||||
{
|
||||
public override bool Identify(ImagePlugin imagePlugin, ulong partitionStart, ulong partitionEnd)
|
||||
public override bool Identify(ImagePlugin imagePlugin, Partition partition)
|
||||
{
|
||||
if(imagePlugin.ImageInfo.sectors != 455 && imagePlugin.ImageInfo.sectors != 560)
|
||||
return false;
|
||||
|
||||
if(partitionStart > 0 || imagePlugin.ImageInfo.sectorSize != 256)
|
||||
if(partition.PartitionStartSector > 0 || imagePlugin.ImageInfo.sectorSize != 256)
|
||||
return false;
|
||||
|
||||
int spt = 0;
|
||||
@@ -63,7 +64,7 @@ namespace DiscImageChef.Filesystems.AppleDOS
|
||||
return vtoc.catalogSector < spt && vtoc.maxTrackSectorPairsPerSector <= 122 && vtoc.sectorsPerTrack == spt && vtoc.bytesPerSector == 256;
|
||||
}
|
||||
|
||||
public override void GetInformation(ImagePlugin imagePlugin, ulong partitionStart, ulong partitionEnd, out string information)
|
||||
public override void GetInformation(ImagePlugin imagePlugin, Partition partition, out string information)
|
||||
{
|
||||
information = "";
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
Reference in New Issue
Block a user