Refactor, pass whole partition structure to filesystems.

This commit is contained in:
2017-07-19 16:31:08 +01:00
parent 68537136d8
commit 711d19fd04
154 changed files with 980 additions and 760 deletions

View File

@@ -1,4 +1,4 @@
// /***************************************************************************
// /***************************************************************************
// The Disc Image Chef
// ----------------------------------------------------------------------------
//
@@ -33,6 +33,7 @@
using System;
using System.Collections.Generic;
using System.Text;
using DiscImageChef.CommonTypes;
using DiscImageChef.ImagePlugins;
namespace DiscImageChef.Filesystems.CPM
@@ -41,8 +42,7 @@ namespace DiscImageChef.Filesystems.CPM
{
bool mounted;
readonly ImagePlugin device;
ulong partStart;
ulong partEnd;
Partition partition;
/// <summary>
/// Stores all known CP/M disk definitions
@@ -117,11 +117,10 @@ namespace DiscImageChef.Filesystems.CPM
CurrentEncoding = Encoding.GetEncoding("IBM437");
}
public CPM(ImagePlugin imagePlugin, ulong partitionStart, ulong partitionEnd, Encoding encoding)
public CPM(ImagePlugin imagePlugin, Partition partition, Encoding encoding)
{
device = imagePlugin;
partStart = partitionStart;
partEnd = partitionEnd;
this.partition = partition;
Name = "CP/M File System";
PluginUUID = new Guid("AA2B8585-41DF-4E3B-8A35-D1A935E2F8A1");
if(encoding == null)