mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
Use generic method to search for partitions, supporting
partitions inside partitions. At the same time SGI DVH is disabled because it is not working correctly. Fixes #60
This commit is contained in:
@@ -452,17 +452,8 @@ namespace DiscImageChef.Core.Devices.Dumping
|
|||||||
|
|
||||||
if(_imageFormat != null)
|
if(_imageFormat != null)
|
||||||
{
|
{
|
||||||
List<Partition> partitions = new List<Partition>();
|
List<Partition> partitions = Partitions.GetAll(_imageFormat);
|
||||||
|
Partitions.AddSchemesToStats(partitions);
|
||||||
foreach(PartPlugin _partplugin in plugins.PartPluginsList.Values)
|
|
||||||
{
|
|
||||||
|
|
||||||
if(_partplugin.GetInformation(_imageFormat, out List<Partition> _partitions))
|
|
||||||
{
|
|
||||||
partitions.AddRange(_partitions);
|
|
||||||
Statistics.AddPartition(_partplugin.Name);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(partitions.Count > 0)
|
if(partitions.Count > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -604,17 +604,8 @@ namespace DiscImageChef.Core.Devices.Dumping
|
|||||||
|
|
||||||
if(_imageFormat != null)
|
if(_imageFormat != null)
|
||||||
{
|
{
|
||||||
List<Partition> partitions = new List<Partition>();
|
List<Partition> partitions = Partitions.GetAll(_imageFormat);
|
||||||
|
Partitions.AddSchemesToStats(partitions);
|
||||||
foreach(PartPlugin _partplugin in plugins.PartPluginsList.Values)
|
|
||||||
{
|
|
||||||
|
|
||||||
if(_partplugin.GetInformation(_imageFormat, out List<Partition> _partitions))
|
|
||||||
{
|
|
||||||
partitions.AddRange(_partitions);
|
|
||||||
Statistics.AddPartition(_partplugin.Name);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(partitions.Count > 0)
|
if(partitions.Count > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -760,17 +760,8 @@ namespace DiscImageChef.Core.Devices.Dumping
|
|||||||
|
|
||||||
if(_imageFormat != null)
|
if(_imageFormat != null)
|
||||||
{
|
{
|
||||||
List<Partition> partitions = new List<Partition>();
|
List<Partition> partitions = Partitions.GetAll(_imageFormat);
|
||||||
|
Partitions.AddSchemesToStats(partitions);
|
||||||
foreach(PartPlugin _partplugin in plugins.PartPluginsList.Values)
|
|
||||||
{
|
|
||||||
|
|
||||||
if(_partplugin.GetInformation(_imageFormat, out List<Partition> _partitions))
|
|
||||||
{
|
|
||||||
partitions.AddRange(_partitions);
|
|
||||||
Statistics.AddPartition(_partplugin.Name);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(partitions.Count > 0)
|
if(partitions.Count > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -79,6 +79,7 @@
|
|||||||
<Compile Include="Devices\Dumping\XGD.cs" />
|
<Compile Include="Devices\Dumping\XGD.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="Devices\Dumping\ResumeSupport.cs" />
|
<Compile Include="Devices\Dumping\ResumeSupport.cs" />
|
||||||
|
<Compile Include="Partitions.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\DiscImageChef.Console\DiscImageChef.Console.csproj">
|
<ProjectReference Include="..\DiscImageChef.Console\DiscImageChef.Console.csproj">
|
||||||
@@ -155,7 +156,7 @@
|
|||||||
<inheritsSet />
|
<inheritsSet />
|
||||||
<inheritsScope />
|
<inheritsScope />
|
||||||
</TextStylePolicy>
|
</TextStylePolicy>
|
||||||
<CSharpFormattingPolicy IndentBlock="True" IndentBraces="False" IndentSwitchSection="True" IndentSwitchCaseSection="True" LabelPositioning="OneLess" NewLinesForBracesInTypes="True" NewLinesForBracesInMethods="True" NewLinesForBracesInProperties="True" NewLinesForBracesInAccessors="True" NewLinesForBracesInAnonymousMethods="True" NewLinesForBracesInControlBlocks="True" NewLinesForBracesInAnonymousTypes="True" NewLinesForBracesInObjectCollectionArrayInitializers="True" NewLinesForBracesInLambdaExpressionBody="True" NewLineForElse="True" NewLineForCatch="True" NewLineForFinally="True" SpacingAfterMethodDeclarationName="False" SpaceWithinMethodDeclarationParenthesis="False" SpaceBetweenEmptyMethodDeclarationParentheses="False" SpaceAfterMethodCallName="False" SpaceWithinMethodCallParentheses="False" SpaceBetweenEmptyMethodCallParentheses="False" SpaceWithinExpressionParentheses="False" SpaceWithinCastParentheses="False" SpaceWithinOtherParentheses="False" SpaceAfterCast="False" SpacesIgnoreAroundVariableDeclaration="False" SpaceBeforeOpenSquareBracket="False" SpaceBetweenEmptySquareBrackets="False" SpaceWithinSquareBrackets="False" SpaceAfterColonInBaseTypeDeclaration="True" SpaceAfterComma="True" SpaceAfterDot="False" SpaceAfterSemicolonsInForStatement="True" SpaceBeforeColonInBaseTypeDeclaration="True" SpaceBeforeComma="False" SpaceBeforeDot="False" SpaceBeforeSemicolonsInForStatement="False" SpacingAroundBinaryOperator="Single" WrappingPreserveSingleLine="True" WrappingKeepStatementsOnSingleLine="True" PlaceSystemDirectiveFirst="True" NewLineForMembersInObjectInit="False" NewLineForMembersInAnonymousTypes="False" NewLineForClausesInQuery="False" SpaceAfterControlFlowStatementKeyword="False" scope="text/x-csharp">
|
<CSharpFormattingPolicy IndentBlock="True" IndentBraces="False" IndentSwitchSection="True" IndentSwitchCaseSection="True" LabelPositioning="OneLess" NewLinesForBracesInTypes="True" NewLinesForBracesInMethods="True" NewLinesForBracesInProperties="True" NewLinesForBracesInAccessors="True" NewLinesForBracesInAnonymousMethods="True" NewLinesForBracesInControlBlocks="True" NewLinesForBracesInAnonymousTypes="True" NewLinesForBracesInObjectCollectionArrayInitializers="True" NewLinesForBracesInLambdaExpressionBody="True" NewLineForElse="True" NewLineForCatch="True" NewLineForFinally="True" SpacingAfterMethodDeclarationName="False" SpaceWithinMethodDeclarationParenthesis="False" SpaceBetweenEmptyMethodDeclarationParentheses="False" SpaceAfterMethodCallName="False" SpaceWithinMethodCallParentheses="False" SpaceBetweenEmptyMethodCallParentheses="False" SpaceAfterControlFlowStatementKeyword="False" SpaceWithinExpressionParentheses="False" SpaceWithinCastParentheses="False" SpaceWithinOtherParentheses="False" SpaceAfterCast="False" SpacesIgnoreAroundVariableDeclaration="False" SpaceBeforeOpenSquareBracket="False" SpaceBetweenEmptySquareBrackets="False" SpaceWithinSquareBrackets="False" SpaceAfterColonInBaseTypeDeclaration="True" SpaceAfterComma="True" SpaceAfterDot="False" SpaceAfterSemicolonsInForStatement="True" SpaceBeforeColonInBaseTypeDeclaration="True" SpaceBeforeComma="False" SpaceBeforeDot="False" SpaceBeforeSemicolonsInForStatement="False" SpacingAroundBinaryOperator="Single" WrappingPreserveSingleLine="True" WrappingKeepStatementsOnSingleLine="True" PlaceSystemDirectiveFirst="True" NewLineForMembersInObjectInit="False" NewLineForMembersInAnonymousTypes="False" NewLineForClausesInQuery="False" scope="text/x-csharp">
|
||||||
<inheritsSet />
|
<inheritsSet />
|
||||||
<inheritsScope />
|
<inheritsScope />
|
||||||
</CSharpFormattingPolicy>
|
</CSharpFormattingPolicy>
|
||||||
|
|||||||
145
DiscImageChef.Core/Partitions.cs
Normal file
145
DiscImageChef.Core/Partitions.cs
Normal file
@@ -0,0 +1,145 @@
|
|||||||
|
// /***************************************************************************
|
||||||
|
// The Disc Image Chef
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Filename : Partitions.cs
|
||||||
|
// Version : 1.0
|
||||||
|
// Author(s) : Natalia Portillo
|
||||||
|
//
|
||||||
|
// Component : Component
|
||||||
|
//
|
||||||
|
// Revision : $Revision$
|
||||||
|
// Last change by : $Author$
|
||||||
|
// Date : $Date$
|
||||||
|
//
|
||||||
|
// --[ Description ] ----------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Description
|
||||||
|
//
|
||||||
|
// --[ License ] --------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU General Public License as
|
||||||
|
// published by the Free Software Foundation, either version 3 of the
|
||||||
|
// License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program 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 General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
//
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// Copyright (C) 2011-2015 Claunia.com
|
||||||
|
// ****************************************************************************/
|
||||||
|
// //$Id$
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using DiscImageChef.CommonTypes;
|
||||||
|
using DiscImageChef.ImagePlugins;
|
||||||
|
using DiscImageChef.PartPlugins;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Net;
|
||||||
|
using DiscImageChef.Console;
|
||||||
|
|
||||||
|
namespace DiscImageChef.Core
|
||||||
|
{
|
||||||
|
public static class Partitions
|
||||||
|
{
|
||||||
|
public static List<Partition> GetAll(ImagePlugin image)
|
||||||
|
{
|
||||||
|
PluginBase plugins = new PluginBase();
|
||||||
|
plugins.RegisterAllPlugins();
|
||||||
|
List<Partition> partitions = new List<Partition>();
|
||||||
|
List<Partition> childPartitions = new List<Partition>();
|
||||||
|
|
||||||
|
// Getting all partitions from device (e.g. tracks)
|
||||||
|
if(image.ImageInfo.imageHasPartitions)
|
||||||
|
{
|
||||||
|
foreach(Partition imagePartition in image.GetPartitions())
|
||||||
|
{
|
||||||
|
foreach(PartPlugin _partplugin in plugins.PartPluginsList.Values)
|
||||||
|
{
|
||||||
|
if(_partplugin.GetInformation(image, out List<Partition> _partitions, imagePartition.Start))
|
||||||
|
partitions.AddRange(_partitions);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Getting all partitions at start of device
|
||||||
|
else
|
||||||
|
{
|
||||||
|
foreach(PartPlugin _partplugin in plugins.PartPluginsList.Values)
|
||||||
|
{
|
||||||
|
if(_partplugin.GetInformation(image, out List<Partition> _partitions, 0))
|
||||||
|
partitions.AddRange(_partitions);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
while(partitions.Count > 0)
|
||||||
|
{
|
||||||
|
List<Partition> childs = new List<Partition>();
|
||||||
|
|
||||||
|
foreach(PartPlugin _partplugin in plugins.PartPluginsList.Values)
|
||||||
|
{
|
||||||
|
DicConsole.DebugWriteLine("Partitions", "Trying {0} @ {1}", _partplugin.Name, partitions[0].Start);
|
||||||
|
if(_partplugin.GetInformation(image, out List<Partition> _partitions, partitions[0].Start))
|
||||||
|
childs.AddRange(_partitions);
|
||||||
|
}
|
||||||
|
|
||||||
|
DicConsole.DebugWriteLine("Partitions", "Got {0} childs", childs.Count);
|
||||||
|
|
||||||
|
if(childs.Count > 0)
|
||||||
|
{
|
||||||
|
Partition father = partitions[0];
|
||||||
|
|
||||||
|
partitions.RemoveAt(0);
|
||||||
|
|
||||||
|
foreach(Partition child in childs)
|
||||||
|
{
|
||||||
|
if(child.Start == father.Start)
|
||||||
|
childPartitions.Add(father);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(!partitions.Contains(child))
|
||||||
|
partitions.Add(child);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
childPartitions.Add(partitions[0]);
|
||||||
|
partitions.RemoveAt(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
DicConsole.DebugWriteLine("Partitions", "Got {0} parents", partitions.Count);
|
||||||
|
DicConsole.DebugWriteLine("Partitions", "Got {0} partitions", childPartitions.Count);
|
||||||
|
}
|
||||||
|
|
||||||
|
Partition[] childArray = childPartitions.OrderBy(part => part.Start).ThenBy(part => part.Length).ThenBy(part => part.Scheme).ToArray();
|
||||||
|
|
||||||
|
for(long i = 0; i < childArray.LongLength; i++)
|
||||||
|
childArray[i].Sequence = (ulong)i;
|
||||||
|
|
||||||
|
return childArray.ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void AddSchemesToStats(List<Partition> partitions)
|
||||||
|
{
|
||||||
|
if(partitions == null || partitions.Count == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
List<string> schemes = new List<string>();
|
||||||
|
|
||||||
|
foreach(Partition part in partitions)
|
||||||
|
{
|
||||||
|
if(!schemes.Contains(part.Scheme))
|
||||||
|
schemes.Add(part.Scheme);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach(string scheme in schemes)
|
||||||
|
Statistics.AddPartition(scheme);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -533,18 +533,8 @@ namespace DiscImageChef.Core
|
|||||||
|
|
||||||
UpdateStatus("Checking filesystems on track {0} from sector {1} to {2}", xmlTrk.Sequence.TrackNumber, xmlTrk.StartSector, xmlTrk.EndSector);
|
UpdateStatus("Checking filesystems on track {0} from sector {1} to {2}", xmlTrk.Sequence.TrackNumber, xmlTrk.StartSector, xmlTrk.EndSector);
|
||||||
|
|
||||||
List<Partition> partitions = new List<Partition>();
|
List<Partition> partitions = Partitions.GetAll(image);
|
||||||
|
Partitions.AddSchemesToStats(partitions);
|
||||||
foreach(PartPlugin _partplugin in plugins.PartPluginsList.Values)
|
|
||||||
{
|
|
||||||
List<Partition> _partitions;
|
|
||||||
|
|
||||||
if(_partplugin.GetInformation(image, out _partitions))
|
|
||||||
{
|
|
||||||
partitions.AddRange(_partitions);
|
|
||||||
Statistics.AddPartition(_partplugin.Name);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
xmlTrk.FileSystemInformation = new PartitionType[1];
|
xmlTrk.FileSystemInformation = new PartitionType[1];
|
||||||
if(partitions.Count > 0)
|
if(partitions.Count > 0)
|
||||||
@@ -855,19 +845,8 @@ namespace DiscImageChef.Core
|
|||||||
|
|
||||||
UpdateStatus("Checking filesystems...");
|
UpdateStatus("Checking filesystems...");
|
||||||
|
|
||||||
List<Partition> partitions = new List<Partition>();
|
List<Partition> partitions = Partitions.GetAll(image);
|
||||||
|
Partitions.AddSchemesToStats(partitions);
|
||||||
foreach(PartPlugin _partplugin in plugins.PartPluginsList.Values)
|
|
||||||
{
|
|
||||||
List<Partition> _partitions;
|
|
||||||
|
|
||||||
if(_partplugin.GetInformation(image, out _partitions))
|
|
||||||
{
|
|
||||||
partitions = _partitions;
|
|
||||||
Statistics.AddPartition(_partplugin.Name);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
sidecar.BlockMedia[0].FileSystemInformation = new PartitionType[1];
|
sidecar.BlockMedia[0].FileSystemInformation = new PartitionType[1];
|
||||||
if(partitions.Count > 0)
|
if(partitions.Count > 0)
|
||||||
|
|||||||
@@ -56,12 +56,16 @@ namespace DiscImageChef.PartPlugins
|
|||||||
PluginUUID = new Guid("A7C8FEBE-8D00-4933-B9F3-42184C8BA808");
|
PluginUUID = new Guid("A7C8FEBE-8D00-4933-B9F3-42184C8BA808");
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool GetInformation(ImagePlugin imagePlugin, out List<Partition> partitions)
|
public override bool GetInformation(ImagePlugin imagePlugin, out List<Partition> partitions, ulong sectorOffset)
|
||||||
{
|
{
|
||||||
partitions = new List<Partition>();
|
partitions = new List<Partition>();
|
||||||
|
|
||||||
ulong sbSector;
|
ulong sbSector;
|
||||||
|
|
||||||
|
// RISC OS always checks for the partition on 0. Afaik no emulator chains it.
|
||||||
|
if(sectorOffset != 0)
|
||||||
|
return false;
|
||||||
|
|
||||||
if(imagePlugin.GetSectorSize() > ADFS_SB_POS)
|
if(imagePlugin.GetSectorSize() > ADFS_SB_POS)
|
||||||
sbSector = 0;
|
sbSector = 0;
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ namespace DiscImageChef.PartPlugins
|
|||||||
PluginUUID = new Guid("36405F8D-4F1A-07F5-209C-223D735D6D22");
|
PluginUUID = new Guid("36405F8D-4F1A-07F5-209C-223D735D6D22");
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool GetInformation(ImagePlugins.ImagePlugin imagePlugin, out List<CommonTypes.Partition> partitions)
|
public override bool GetInformation(ImagePlugins.ImagePlugin imagePlugin, out List<CommonTypes.Partition> partitions, ulong sectorOffset)
|
||||||
{
|
{
|
||||||
uint sector_size;
|
uint sector_size;
|
||||||
|
|
||||||
@@ -68,7 +68,7 @@ namespace DiscImageChef.PartPlugins
|
|||||||
|
|
||||||
partitions = new List<CommonTypes.Partition>();
|
partitions = new List<CommonTypes.Partition>();
|
||||||
|
|
||||||
byte[] ddm_sector = imagePlugin.ReadSector(0);
|
byte[] ddm_sector = imagePlugin.ReadSector(sectorOffset);
|
||||||
AppleDriverDescriptorMap ddm;
|
AppleDriverDescriptorMap ddm;
|
||||||
|
|
||||||
ushort max_drivers = 61;
|
ushort max_drivers = 61;
|
||||||
@@ -132,7 +132,7 @@ namespace DiscImageChef.PartPlugins
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
byte[] part_sector = imagePlugin.ReadSector(1);
|
byte[] part_sector = imagePlugin.ReadSector(1 + sectorOffset);
|
||||||
AppleOldDevicePartitionMap old_map = BigEndianMarshal.ByteArrayToStructureBigEndian<AppleOldDevicePartitionMap>(part_sector);
|
AppleOldDevicePartitionMap old_map = BigEndianMarshal.ByteArrayToStructureBigEndian<AppleOldDevicePartitionMap>(part_sector);
|
||||||
|
|
||||||
// This is the easy one, no sector size mixing
|
// This is the easy one, no sector size mixing
|
||||||
@@ -228,7 +228,7 @@ namespace DiscImageChef.PartPlugins
|
|||||||
return partitions.Count > 0;
|
return partitions.Count > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
byte[] entries = imagePlugin.ReadSectors(0, sectors_to_read);
|
byte[] entries = imagePlugin.ReadSectors(sectorOffset, sectors_to_read);
|
||||||
DicConsole.DebugWriteLine("AppleMap Plugin", "entry_size = {0}", entry_size);
|
DicConsole.DebugWriteLine("AppleMap Plugin", "entry_size = {0}", entry_size);
|
||||||
DicConsole.DebugWriteLine("AppleMap Plugin", "entry_count = {0}", entry_count);
|
DicConsole.DebugWriteLine("AppleMap Plugin", "entry_count = {0}", entry_count);
|
||||||
DicConsole.DebugWriteLine("AppleMap Plugin", "skip_ddm = {0}", skip_ddm);
|
DicConsole.DebugWriteLine("AppleMap Plugin", "skip_ddm = {0}", skip_ddm);
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ namespace DiscImageChef.PartPlugins
|
|||||||
PluginUUID = new Guid("d1dd0f24-ec39-4c4d-9072-be31919a3b5e");
|
PluginUUID = new Guid("d1dd0f24-ec39-4c4d-9072-be31919a3b5e");
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool GetInformation(ImagePlugins.ImagePlugin imagePlugin, out List<CommonTypes.Partition> partitions)
|
public override bool GetInformation(ImagePlugins.ImagePlugin imagePlugin, out List<CommonTypes.Partition> partitions, ulong sectorOffset)
|
||||||
{
|
{
|
||||||
partitions = new List<CommonTypes.Partition>();
|
partitions = new List<CommonTypes.Partition>();
|
||||||
|
|
||||||
@@ -67,7 +67,7 @@ namespace DiscImageChef.PartPlugins
|
|||||||
|
|
||||||
BigEndianBitConverter.IsLittleEndian = BitConverter.IsLittleEndian;
|
BigEndianBitConverter.IsLittleEndian = BitConverter.IsLittleEndian;
|
||||||
|
|
||||||
byte[] sector = imagePlugin.ReadSector(0);
|
byte[] sector = imagePlugin.ReadSector(sectorOffset);
|
||||||
|
|
||||||
AtariTable table = new AtariTable();
|
AtariTable table = new AtariTable();
|
||||||
table.boot = new byte[342];
|
table.boot = new byte[342];
|
||||||
|
|||||||
@@ -48,11 +48,11 @@ namespace DiscImageChef.PartPlugins
|
|||||||
PluginUUID = new Guid("246A6D93-4F1A-1F8A-344D-50187A5513A9");
|
PluginUUID = new Guid("246A6D93-4F1A-1F8A-344D-50187A5513A9");
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool GetInformation(ImagePlugin imagePlugin, out List<Partition> partitions)
|
public override bool GetInformation(ImagePlugin imagePlugin, out List<Partition> partitions, ulong sectorOffset)
|
||||||
{
|
{
|
||||||
partitions = new List<Partition>();
|
partitions = new List<Partition>();
|
||||||
|
|
||||||
byte[] sector = imagePlugin.ReadSector(0);
|
byte[] sector = imagePlugin.ReadSector(sectorOffset);
|
||||||
if(sector.Length < 512)
|
if(sector.Length < 512)
|
||||||
return false;
|
return false;
|
||||||
bool found = false;
|
bool found = false;
|
||||||
@@ -63,7 +63,7 @@ namespace DiscImageChef.PartPlugins
|
|||||||
found = true;
|
found = true;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sector = imagePlugin.ReadSector(1);
|
sector = imagePlugin.ReadSector(1 + sectorOffset);
|
||||||
|
|
||||||
dl = GetDiskLabel(sector);
|
dl = GetDiskLabel(sector);
|
||||||
|
|
||||||
|
|||||||
@@ -49,11 +49,14 @@ namespace DiscImageChef.PartPlugins
|
|||||||
PluginUUID = new Guid("58CEC3B7-3B93-4D47-86EE-D6DADE9D444F");
|
PluginUUID = new Guid("58CEC3B7-3B93-4D47-86EE-D6DADE9D444F");
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool GetInformation(ImagePlugin imagePlugin, out List<Partition> partitions)
|
public override bool GetInformation(ImagePlugin imagePlugin, out List<Partition> partitions, ulong sectorOffset)
|
||||||
{
|
{
|
||||||
partitions = new List<Partition>();
|
partitions = new List<Partition>();
|
||||||
|
|
||||||
byte[] sector = imagePlugin.ReadSector(31);
|
if(31 + sectorOffset >= imagePlugin.GetSectors())
|
||||||
|
return false;
|
||||||
|
|
||||||
|
byte[] sector = imagePlugin.ReadSector(31 + sectorOffset);
|
||||||
if(sector.Length < 512)
|
if(sector.Length < 512)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|||||||
@@ -48,12 +48,15 @@ namespace DiscImageChef.PartPlugins
|
|||||||
PluginUUID = new Guid("D49E41A6-D952-4760-9D94-03DAE2450C5F");
|
PluginUUID = new Guid("D49E41A6-D952-4760-9D94-03DAE2450C5F");
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool GetInformation(ImagePlugin imagePlugin, out List<Partition> partitions)
|
public override bool GetInformation(ImagePlugin imagePlugin, out List<Partition> partitions, ulong sectorOffset)
|
||||||
{
|
{
|
||||||
partitions = new List<Partition>();
|
partitions = new List<Partition>();
|
||||||
uint nSectors = 2048 / imagePlugin.GetSectorSize();
|
uint nSectors = 2048 / imagePlugin.GetSectorSize();
|
||||||
|
|
||||||
byte[] sectors = imagePlugin.ReadSectors(0, nSectors);
|
if(sectorOffset + nSectors >= imagePlugin.GetSectors())
|
||||||
|
return false;
|
||||||
|
|
||||||
|
byte[] sectors = imagePlugin.ReadSectors(sectorOffset, nSectors);
|
||||||
if(sectors.Length < 2048)
|
if(sectors.Length < 2048)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|||||||
@@ -48,11 +48,11 @@ namespace DiscImageChef.PartPlugins
|
|||||||
PluginUUID = new Guid("CBC9D281-C1D0-44E8-9038-4D66FD2678AB");
|
PluginUUID = new Guid("CBC9D281-C1D0-44E8-9038-4D66FD2678AB");
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool GetInformation(ImagePlugins.ImagePlugin imagePlugin, out List<CommonTypes.Partition> partitions)
|
public override bool GetInformation(ImagePlugins.ImagePlugin imagePlugin, out List<CommonTypes.Partition> partitions, ulong sectorOffset)
|
||||||
{
|
{
|
||||||
partitions = new List<CommonTypes.Partition>();
|
partitions = new List<CommonTypes.Partition>();
|
||||||
|
|
||||||
byte[] hdrBytes = imagePlugin.ReadSector(1);
|
byte[] hdrBytes = imagePlugin.ReadSector(1 + sectorOffset);
|
||||||
GptHeader hdr;
|
GptHeader hdr;
|
||||||
|
|
||||||
try
|
try
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ namespace DiscImageChef.PartPlugins
|
|||||||
PluginUUID = new Guid("246A6D93-4F1A-1F8A-344D-50187A5513A9");
|
PluginUUID = new Guid("246A6D93-4F1A-1F8A-344D-50187A5513A9");
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool GetInformation(ImagePlugin imagePlugin, out List<Partition> partitions)
|
public override bool GetInformation(ImagePlugin imagePlugin, out List<Partition> partitions, ulong sectorOffset)
|
||||||
{
|
{
|
||||||
partitions = new List<Partition>();
|
partitions = new List<Partition>();
|
||||||
|
|
||||||
@@ -59,18 +59,21 @@ namespace DiscImageChef.PartPlugins
|
|||||||
|
|
||||||
DicConsole.DebugWriteLine("Human68k plugin", "sectorSize = {0}", imagePlugin.GetSectorSize());
|
DicConsole.DebugWriteLine("Human68k plugin", "sectorSize = {0}", imagePlugin.GetSectorSize());
|
||||||
|
|
||||||
|
if(sectorOffset + 4 >= imagePlugin.GetSectors())
|
||||||
|
return false;
|
||||||
|
|
||||||
switch(imagePlugin.GetSectorSize())
|
switch(imagePlugin.GetSectorSize())
|
||||||
{
|
{
|
||||||
case 256:
|
case 256:
|
||||||
sector = imagePlugin.ReadSector(4);
|
sector = imagePlugin.ReadSector(4 + sectorOffset);
|
||||||
sectsPerUnit = 1;
|
sectsPerUnit = 1;
|
||||||
break;
|
break;
|
||||||
case 512:
|
case 512:
|
||||||
sector = imagePlugin.ReadSector(4);
|
sector = imagePlugin.ReadSector(4 + sectorOffset);
|
||||||
sectsPerUnit = 2;
|
sectsPerUnit = 2;
|
||||||
break;
|
break;
|
||||||
case 1024:
|
case 1024:
|
||||||
sector = imagePlugin.ReadSector(2);
|
sector = imagePlugin.ReadSector(2 + sectorOffset);
|
||||||
sectsPerUnit = 1;
|
sectsPerUnit = 1;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -79,13 +82,14 @@ namespace DiscImageChef.PartPlugins
|
|||||||
|
|
||||||
X68kTable table = BigEndianMarshal.ByteArrayToStructureBigEndian<X68kTable>(sector);
|
X68kTable table = BigEndianMarshal.ByteArrayToStructureBigEndian<X68kTable>(sector);
|
||||||
|
|
||||||
|
DicConsole.DebugWriteLine("Human68k plugin", "table.magic = {0:X4}", table.magic);
|
||||||
|
|
||||||
if(table.magic != X68kMagic)
|
if(table.magic != X68kMagic)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
for(int i = 0; i < table.entries.Length; i++)
|
for(int i = 0; i < table.entries.Length; i++)
|
||||||
table.entries[i] = BigEndianMarshal.SwapStructureMembersEndian(table.entries[i]);
|
table.entries[i] = BigEndianMarshal.SwapStructureMembersEndian(table.entries[i]);
|
||||||
|
|
||||||
DicConsole.DebugWriteLine("Human68k plugin", "table.signature = {0:X4}", table.magic);
|
|
||||||
DicConsole.DebugWriteLine("Human68k plugin", "table.size = {0:X4}", table.size);
|
DicConsole.DebugWriteLine("Human68k plugin", "table.size = {0:X4}", table.size);
|
||||||
DicConsole.DebugWriteLine("Human68k plugin", "table.size2 = {0:X4}", table.size2);
|
DicConsole.DebugWriteLine("Human68k plugin", "table.size2 = {0:X4}", table.size2);
|
||||||
DicConsole.DebugWriteLine("Human68k plugin", "table.unknown = {0:X4}", table.unknown);
|
DicConsole.DebugWriteLine("Human68k plugin", "table.unknown = {0:X4}", table.unknown);
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ namespace DiscImageChef.PartPlugins
|
|||||||
PluginUUID = new Guid("5E8A34E8-4F1A-59E6-4BF7-7EA647063A76");
|
PluginUUID = new Guid("5E8A34E8-4F1A-59E6-4BF7-7EA647063A76");
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool GetInformation(ImagePlugins.ImagePlugin imagePlugin, out List<CommonTypes.Partition> partitions)
|
public override bool GetInformation(ImagePlugins.ImagePlugin imagePlugin, out List<CommonTypes.Partition> partitions, ulong sectorOffset)
|
||||||
{
|
{
|
||||||
ulong counter = 0;
|
ulong counter = 0;
|
||||||
|
|
||||||
@@ -65,7 +65,7 @@ namespace DiscImageChef.PartPlugins
|
|||||||
divider = 4;
|
divider = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
byte[] sector = imagePlugin.ReadSector(0);
|
byte[] sector = imagePlugin.ReadSector(sectorOffset);
|
||||||
|
|
||||||
GCHandle handle = GCHandle.Alloc(sector, GCHandleType.Pinned);
|
GCHandle handle = GCHandle.Alloc(sector, GCHandleType.Pinned);
|
||||||
MasterBootRecord mbr = (MasterBootRecord)Marshal.PtrToStructure(handle.AddrOfPinnedObject(), typeof(MasterBootRecord));
|
MasterBootRecord mbr = (MasterBootRecord)Marshal.PtrToStructure(handle.AddrOfPinnedObject(), typeof(MasterBootRecord));
|
||||||
@@ -76,6 +76,8 @@ namespace DiscImageChef.PartPlugins
|
|||||||
DiskManagerMasterBootRecord mbr_ontrack = (DiskManagerMasterBootRecord)Marshal.PtrToStructure(handle.AddrOfPinnedObject(), typeof(DiskManagerMasterBootRecord));
|
DiskManagerMasterBootRecord mbr_ontrack = (DiskManagerMasterBootRecord)Marshal.PtrToStructure(handle.AddrOfPinnedObject(), typeof(DiskManagerMasterBootRecord));
|
||||||
handle.Free();
|
handle.Free();
|
||||||
|
|
||||||
|
DicConsole.DebugWriteLine("MBR plugin", "mbr.magic = {0:X4}", mbr.magic);
|
||||||
|
|
||||||
if(mbr.magic != MBR_Magic)
|
if(mbr.magic != MBR_Magic)
|
||||||
return false; // Not MBR
|
return false; // Not MBR
|
||||||
|
|
||||||
@@ -152,7 +154,7 @@ namespace DiscImageChef.PartPlugins
|
|||||||
CommonTypes.Partition part = new CommonTypes.Partition();
|
CommonTypes.Partition part = new CommonTypes.Partition();
|
||||||
if(lba_start > 0 && lba_sectors > 0)
|
if(lba_start > 0 && lba_sectors > 0)
|
||||||
{
|
{
|
||||||
part.Start = entry.lba_start;
|
part.Start = entry.lba_start + sectorOffset;
|
||||||
part.Length = entry.lba_sectors;
|
part.Length = entry.lba_sectors;
|
||||||
part.Offset = part.Start * sectorSize;
|
part.Offset = part.Start * sectorSize;
|
||||||
part.Size = part.Length * sectorSize;
|
part.Size = part.Length * sectorSize;
|
||||||
@@ -251,7 +253,7 @@ namespace DiscImageChef.PartPlugins
|
|||||||
CommonTypes.Partition part = new CommonTypes.Partition();
|
CommonTypes.Partition part = new CommonTypes.Partition();
|
||||||
if(ext_start > 0 && ext_sectors > 0)
|
if(ext_start > 0 && ext_sectors > 0)
|
||||||
{
|
{
|
||||||
part.Start = ext_start;
|
part.Start = ext_start + sectorOffset;
|
||||||
part.Length = ext_sectors;
|
part.Length = ext_sectors;
|
||||||
part.Offset = part.Start * sectorSize;
|
part.Offset = part.Start * sectorSize;
|
||||||
part.Size = part.Length * sectorSize;
|
part.Size = part.Length * sectorSize;
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ namespace DiscImageChef.PartPlugins
|
|||||||
PluginUUID = new Guid("246A6D93-4F1A-1F8A-344D-50187A5513A9");
|
PluginUUID = new Guid("246A6D93-4F1A-1F8A-344D-50187A5513A9");
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool GetInformation(ImagePlugins.ImagePlugin imagePlugin, out List<CommonTypes.Partition> partitions)
|
public override bool GetInformation(ImagePlugins.ImagePlugin imagePlugin, out List<CommonTypes.Partition> partitions, ulong sectorOffset)
|
||||||
{
|
{
|
||||||
bool magic_found = false;
|
bool magic_found = false;
|
||||||
byte[] label_sector;
|
byte[] label_sector;
|
||||||
@@ -74,18 +74,19 @@ namespace DiscImageChef.PartPlugins
|
|||||||
|
|
||||||
BigEndianBitConverter.IsLittleEndian = BitConverter.IsLittleEndian;
|
BigEndianBitConverter.IsLittleEndian = BitConverter.IsLittleEndian;
|
||||||
|
|
||||||
label_sector = imagePlugin.ReadSector(0); // Starts on sector 0 on NeXT machines, CDs and floppies
|
|
||||||
magic = BigEndianBitConverter.ToUInt32(label_sector, 0x00);
|
|
||||||
ulong label_position = 0;
|
ulong label_position = 0;
|
||||||
|
|
||||||
foreach(ulong i in new ulong[]{0, 4, 15, 16})
|
foreach(ulong i in new ulong[]{0, 4, 15, 16})
|
||||||
{
|
{
|
||||||
label_sector = imagePlugin.ReadSector(i);
|
if(i + sectorOffset >= imagePlugin.GetSectors())
|
||||||
|
break;
|
||||||
|
|
||||||
|
label_sector = imagePlugin.ReadSector(i + sectorOffset);
|
||||||
magic = BigEndianBitConverter.ToUInt32(label_sector, 0x00);
|
magic = BigEndianBitConverter.ToUInt32(label_sector, 0x00);
|
||||||
if(magic == NEXT_MAGIC1 || magic == NEXT_MAGIC2 || magic == NEXT_MAGIC3)
|
if(magic == NEXT_MAGIC1 || magic == NEXT_MAGIC2 || magic == NEXT_MAGIC3)
|
||||||
{
|
{
|
||||||
magic_found = true;
|
magic_found = true;
|
||||||
label_position = i;
|
label_position = i + sectorOffset;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,12 +49,12 @@ namespace DiscImageChef.PartPlugins
|
|||||||
PluginUUID = new Guid("27333401-C7C2-447D-961C-22AD0641A09A\n");
|
PluginUUID = new Guid("27333401-C7C2-447D-961C-22AD0641A09A\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool GetInformation(ImagePlugin imagePlugin, out List<Partition> partitions)
|
public override bool GetInformation(ImagePlugin imagePlugin, out List<Partition> partitions, ulong sectorOffset)
|
||||||
{
|
{
|
||||||
partitions = new List<Partition>();
|
partitions = new List<Partition>();
|
||||||
|
|
||||||
byte[] bootSector = imagePlugin.ReadSector(0);
|
byte[] bootSector = imagePlugin.ReadSector(sectorOffset);
|
||||||
byte[] sector = imagePlugin.ReadSector(1);
|
byte[] sector = imagePlugin.ReadSector(1 + sectorOffset);
|
||||||
if(sector.Length < 512)
|
if(sector.Length < 512)
|
||||||
return false;
|
return false;
|
||||||
if(bootSector[0x1FE] != 0x55 || bootSector[0x1FF] != 0xAA)
|
if(bootSector[0x1FE] != 0x55 || bootSector[0x1FF] != 0xAA)
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ namespace DiscImageChef.PartPlugins
|
|||||||
/// <returns><c>true</c>, if partitioning scheme is recognized, <c>false</c> otherwise.</returns>
|
/// <returns><c>true</c>, if partitioning scheme is recognized, <c>false</c> otherwise.</returns>
|
||||||
/// <param name="imagePlugin">Disk image.</param>
|
/// <param name="imagePlugin">Disk image.</param>
|
||||||
/// <param name="partitions">Returns list of partitions.</param>
|
/// <param name="partitions">Returns list of partitions.</param>
|
||||||
public abstract bool GetInformation(ImagePlugins.ImagePlugin imagePlugin, out List<CommonTypes.Partition> partitions);
|
/// <param name="sectorOffset">At which sector to start searching for the partition scheme.</param>
|
||||||
|
public abstract bool GetInformation(ImagePlugins.ImagePlugin imagePlugin, out List<CommonTypes.Partition> partitions, ulong sectorOffset);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -889,7 +889,7 @@ namespace DiscImageChef.PartPlugins
|
|||||||
public byte[] loadData;
|
public byte[] loadData;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool GetInformation(ImagePlugins.ImagePlugin imagePlugin, out List<CommonTypes.Partition> partitions)
|
public override bool GetInformation(ImagePlugins.ImagePlugin imagePlugin, out List<CommonTypes.Partition> partitions, ulong sectorOffset)
|
||||||
{
|
{
|
||||||
partitions = new List<CommonTypes.Partition>();
|
partitions = new List<CommonTypes.Partition>();
|
||||||
BigEndianBitConverter.IsLittleEndian = BitConverter.IsLittleEndian;
|
BigEndianBitConverter.IsLittleEndian = BitConverter.IsLittleEndian;
|
||||||
@@ -901,7 +901,10 @@ namespace DiscImageChef.PartPlugins
|
|||||||
if(imagePlugin.GetSectors() <= RDBBlock)
|
if(imagePlugin.GetSectors() <= RDBBlock)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
byte[] tmpSector = imagePlugin.ReadSector(RDBBlock);
|
if(RDBBlock + sectorOffset >= imagePlugin.GetSectors())
|
||||||
|
break;
|
||||||
|
|
||||||
|
byte[] tmpSector = imagePlugin.ReadSector(RDBBlock + sectorOffset);
|
||||||
uint magic = BigEndianBitConverter.ToUInt32(tmpSector, 0);
|
uint magic = BigEndianBitConverter.ToUInt32(tmpSector, 0);
|
||||||
|
|
||||||
DicConsole.DebugWriteLine("Amiga RDB plugin", "Possible magic at block {0} is 0x{1:X8}", RDBBlock, magic);
|
DicConsole.DebugWriteLine("Amiga RDB plugin", "Possible magic at block {0} is 0x{1:X8}", RDBBlock, magic);
|
||||||
@@ -920,6 +923,8 @@ namespace DiscImageChef.PartPlugins
|
|||||||
if(!foundRDB)
|
if(!foundRDB)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
RDBBlock += sectorOffset;
|
||||||
|
|
||||||
byte[] sector;
|
byte[] sector;
|
||||||
byte[] tmpString;
|
byte[] tmpString;
|
||||||
|
|
||||||
@@ -1109,9 +1114,9 @@ namespace DiscImageChef.PartPlugins
|
|||||||
nextBlock = RDB.partition_ptr;
|
nextBlock = RDB.partition_ptr;
|
||||||
while(nextBlock != 0xFFFFFFFF)
|
while(nextBlock != 0xFFFFFFFF)
|
||||||
{
|
{
|
||||||
DicConsole.DebugWriteLine("Amiga RDB plugin", "Going to block {0} in search of a PartitionEntry block", nextBlock);
|
DicConsole.DebugWriteLine("Amiga RDB plugin", "Going to block {0} in search of a PartitionEntry block", nextBlock + sectorOffset);
|
||||||
|
|
||||||
sector = imagePlugin.ReadSector(nextBlock);
|
sector = imagePlugin.ReadSector(nextBlock + sectorOffset);
|
||||||
uint magic = BigEndianBitConverter.ToUInt32(sector, 0);
|
uint magic = BigEndianBitConverter.ToUInt32(sector, 0);
|
||||||
|
|
||||||
if(magic != PartitionBlockMagic)
|
if(magic != PartitionBlockMagic)
|
||||||
@@ -1349,7 +1354,7 @@ namespace DiscImageChef.PartPlugins
|
|||||||
Name = RDBEntry.driveName,
|
Name = RDBEntry.driveName,
|
||||||
Sequence = sequence,
|
Sequence = sequence,
|
||||||
Length = (RDBEntry.dosEnvVec.highCylinder + 1 - RDBEntry.dosEnvVec.lowCylinder) * RDBEntry.dosEnvVec.surfaces * RDBEntry.dosEnvVec.bpt,
|
Length = (RDBEntry.dosEnvVec.highCylinder + 1 - RDBEntry.dosEnvVec.lowCylinder) * RDBEntry.dosEnvVec.surfaces * RDBEntry.dosEnvVec.bpt,
|
||||||
Start = RDBEntry.dosEnvVec.lowCylinder * RDBEntry.dosEnvVec.surfaces * RDBEntry.dosEnvVec.bpt,
|
Start = RDBEntry.dosEnvVec.lowCylinder * RDBEntry.dosEnvVec.surfaces * RDBEntry.dosEnvVec.bpt + sectorOffset,
|
||||||
Type = AmigaDOSTypeToString(RDBEntry.dosEnvVec.dosType),
|
Type = AmigaDOSTypeToString(RDBEntry.dosEnvVec.dosType),
|
||||||
Scheme = Name
|
Scheme = Name
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -49,11 +49,11 @@ namespace DiscImageChef.PartPlugins
|
|||||||
PluginUUID = new Guid("246A6D93-4F1A-1F8A-344D-50187A5513A9");
|
PluginUUID = new Guid("246A6D93-4F1A-1F8A-344D-50187A5513A9");
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool GetInformation(ImagePlugin imagePlugin, out List<Partition> partitions)
|
public override bool GetInformation(ImagePlugin imagePlugin, out List<Partition> partitions, ulong sectorOffset)
|
||||||
{
|
{
|
||||||
partitions = new List<Partition>();
|
partitions = new List<Partition>();
|
||||||
|
|
||||||
byte[] sector = imagePlugin.ReadSector(0);
|
byte[] sector = imagePlugin.ReadSector(sectorOffset);
|
||||||
if(sector.Length < 512)
|
if(sector.Length < 512)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|||||||
@@ -48,11 +48,14 @@ namespace DiscImageChef.PartPlugins
|
|||||||
PluginUUID = new Guid("AEF5AB45-4880-4CE8-8735-F0A402E2E5F2");
|
PluginUUID = new Guid("AEF5AB45-4880-4CE8-8735-F0A402E2E5F2");
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool GetInformation(ImagePlugin imagePlugin, out List<Partition> partitions)
|
public override bool GetInformation(ImagePlugin imagePlugin, out List<Partition> partitions, ulong sectorOffset)
|
||||||
{
|
{
|
||||||
partitions = new List<Partition>();
|
partitions = new List<Partition>();
|
||||||
|
|
||||||
byte[] sector = imagePlugin.ReadSector(0);
|
// TODO: This is not working
|
||||||
|
return false;
|
||||||
|
|
||||||
|
byte[] sector = imagePlugin.ReadSector(sectorOffset);
|
||||||
if(sector.Length < 512)
|
if(sector.Length < 512)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|||||||
@@ -82,14 +82,14 @@ namespace DiscImageChef.PartPlugins
|
|||||||
PluginUUID = new Guid("50F35CC4-8375-4445-8DCB-1BA550C931A3");
|
PluginUUID = new Guid("50F35CC4-8375-4445-8DCB-1BA550C931A3");
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool GetInformation(ImagePlugins.ImagePlugin imagePlugin, out List<CommonTypes.Partition> partitions)
|
public override bool GetInformation(ImagePlugins.ImagePlugin imagePlugin, out List<CommonTypes.Partition> partitions, ulong sectorOffset)
|
||||||
{
|
{
|
||||||
partitions = new List<CommonTypes.Partition>();
|
partitions = new List<CommonTypes.Partition>();
|
||||||
|
|
||||||
if(imagePlugin.GetSectorSize() < 512)
|
if(imagePlugin.GetSectorSize() < 512)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
byte[] sunSector = imagePlugin.ReadSector(0);
|
byte[] sunSector = imagePlugin.ReadSector(sectorOffset);
|
||||||
byte[] tmpString;
|
byte[] tmpString;
|
||||||
SunDiskLabel sdl = new SunDiskLabel
|
SunDiskLabel sdl = new SunDiskLabel
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -49,35 +49,31 @@ namespace DiscImageChef.PartPlugins
|
|||||||
PluginUUID = new Guid("6D35A66F-8D77-426F-A562-D88F6A1F1702");
|
PluginUUID = new Guid("6D35A66F-8D77-426F-A562-D88F6A1F1702");
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool GetInformation(ImagePlugin imagePlugin, out List<Partition> partitions)
|
public override bool GetInformation(ImagePlugin imagePlugin, out List<Partition> partitions, ulong sectorOffset)
|
||||||
{
|
{
|
||||||
partitions = new List<Partition>();
|
partitions = new List<Partition>();
|
||||||
|
|
||||||
uint magic;
|
uint magic;
|
||||||
byte[] unix_dl_sector;
|
byte[] unix_dl_sector = null;
|
||||||
|
bool magic_found = false;
|
||||||
|
|
||||||
unix_dl_sector = imagePlugin.ReadSector(0);
|
foreach(ulong i in new ulong[] {0, 1, 8, 29})
|
||||||
magic = BitConverter.ToUInt32(unix_dl_sector, 4);
|
|
||||||
if(magic != UNIXDiskLabel_MAGIC)
|
|
||||||
{
|
{
|
||||||
unix_dl_sector = imagePlugin.ReadSector(1);
|
if(i + sectorOffset >= imagePlugin.GetSectors())
|
||||||
|
break;
|
||||||
|
|
||||||
|
unix_dl_sector = imagePlugin.ReadSector(i + sectorOffset);
|
||||||
magic = BitConverter.ToUInt32(unix_dl_sector, 4);
|
magic = BitConverter.ToUInt32(unix_dl_sector, 4);
|
||||||
if(magic != UNIXDiskLabel_MAGIC)
|
if(magic == UNIXDiskLabel_MAGIC)
|
||||||
{
|
{
|
||||||
unix_dl_sector = imagePlugin.ReadSector(8);
|
magic_found = true;
|
||||||
magic = BitConverter.ToUInt32(unix_dl_sector, 4);
|
break;
|
||||||
|
|
||||||
if(magic != UNIXDiskLabel_MAGIC)
|
|
||||||
{
|
|
||||||
unix_dl_sector = imagePlugin.ReadSector(29);
|
|
||||||
magic = BitConverter.ToUInt32(unix_dl_sector, 4);
|
|
||||||
|
|
||||||
if(magic != UNIXDiskLabel_MAGIC)
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!magic_found)
|
||||||
|
return false;
|
||||||
|
|
||||||
UNIXDiskLabel dl = new UNIXDiskLabel();
|
UNIXDiskLabel dl = new UNIXDiskLabel();
|
||||||
UNIXVTOC vtoc = new UNIXVTOC(); // old/new
|
UNIXVTOC vtoc = new UNIXVTOC(); // old/new
|
||||||
bool isNewDL = false;
|
bool isNewDL = false;
|
||||||
|
|||||||
@@ -77,10 +77,14 @@ namespace DiscImageChef.PartPlugins
|
|||||||
PluginUUID = new Guid("E3F6FB91-D358-4F22-A550-81E92D50EB78");
|
PluginUUID = new Guid("E3F6FB91-D358-4F22-A550-81E92D50EB78");
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool GetInformation(ImagePlugin imagePlugin, out List<Partition> partitions)
|
public override bool GetInformation(ImagePlugin imagePlugin, out List<Partition> partitions, ulong sectorOffset)
|
||||||
{
|
{
|
||||||
partitions = new List<Partition>();
|
partitions = new List<Partition>();
|
||||||
|
|
||||||
|
// Xbox partitions always start on 0
|
||||||
|
if(sectorOffset != 0)
|
||||||
|
return false;
|
||||||
|
|
||||||
byte[] sector = imagePlugin.ReadSector(0);
|
byte[] sector = imagePlugin.ReadSector(0);
|
||||||
if(sector.Length < 512)
|
if(sector.Length < 512)
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -203,6 +203,10 @@
|
|||||||
<Project>{DA7AB65D-B5BA-4003-8893-A51BB071BA2F}</Project>
|
<Project>{DA7AB65D-B5BA-4003-8893-A51BB071BA2F}</Project>
|
||||||
<Name>DiscImageChef.Partitions</Name>
|
<Name>DiscImageChef.Partitions</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\DiscImageChef.Core\DiscImageChef.Core.csproj">
|
||||||
|
<Project>{679659B8-25D0-4279-B632-56EF8F94ADC0}</Project>
|
||||||
|
<Name>DiscImageChef.Core</Name>
|
||||||
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||||
<ProjectExtensions>
|
<ProjectExtensions>
|
||||||
@@ -213,7 +217,7 @@
|
|||||||
<inheritsSet />
|
<inheritsSet />
|
||||||
<inheritsScope />
|
<inheritsScope />
|
||||||
</TextStylePolicy>
|
</TextStylePolicy>
|
||||||
<CSharpFormattingPolicy IndentBlock="True" IndentBraces="False" IndentSwitchSection="True" IndentSwitchCaseSection="True" LabelPositioning="OneLess" NewLinesForBracesInTypes="True" NewLinesForBracesInMethods="True" NewLinesForBracesInProperties="True" NewLinesForBracesInAccessors="True" NewLinesForBracesInAnonymousMethods="True" NewLinesForBracesInControlBlocks="True" NewLinesForBracesInAnonymousTypes="True" NewLinesForBracesInObjectCollectionArrayInitializers="True" NewLinesForBracesInLambdaExpressionBody="True" NewLineForElse="True" NewLineForCatch="True" NewLineForFinally="True" NewLineForMembersInObjectInit="True" NewLineForMembersInAnonymousTypes="True" NewLineForClausesInQuery="True" SpacingAfterMethodDeclarationName="False" SpaceWithinMethodDeclarationParenthesis="False" SpaceBetweenEmptyMethodDeclarationParentheses="False" SpaceAfterMethodCallName="False" SpaceWithinMethodCallParentheses="False" SpaceBetweenEmptyMethodCallParentheses="False" SpaceAfterControlFlowStatementKeyword="False" SpaceWithinExpressionParentheses="False" SpaceWithinCastParentheses="False" SpaceWithinOtherParentheses="False" SpaceAfterCast="False" SpacesIgnoreAroundVariableDeclaration="False" SpaceBeforeOpenSquareBracket="False" SpaceBetweenEmptySquareBrackets="False" SpaceWithinSquareBrackets="False" SpaceAfterColonInBaseTypeDeclaration="True" SpaceAfterComma="True" SpaceAfterDot="False" SpaceAfterSemicolonsInForStatement="True" SpaceBeforeColonInBaseTypeDeclaration="True" SpaceBeforeComma="False" SpaceBeforeDot="False" SpaceBeforeSemicolonsInForStatement="False" SpacingAroundBinaryOperator="Single" WrappingPreserveSingleLine="True" WrappingKeepStatementsOnSingleLine="True" PlaceSystemDirectiveFirst="True" scope="text/x-csharp">
|
<CSharpFormattingPolicy IndentBlock="True" IndentBraces="False" IndentSwitchSection="True" IndentSwitchCaseSection="True" LabelPositioning="OneLess" NewLinesForBracesInTypes="True" NewLinesForBracesInMethods="True" NewLinesForBracesInProperties="True" NewLinesForBracesInAccessors="True" NewLinesForBracesInAnonymousMethods="True" NewLinesForBracesInControlBlocks="True" NewLinesForBracesInAnonymousTypes="True" NewLinesForBracesInObjectCollectionArrayInitializers="True" NewLinesForBracesInLambdaExpressionBody="True" NewLineForElse="True" NewLineForCatch="True" NewLineForFinally="True" SpacingAfterMethodDeclarationName="False" SpaceWithinMethodDeclarationParenthesis="False" SpaceBetweenEmptyMethodDeclarationParentheses="False" SpaceAfterMethodCallName="False" SpaceWithinMethodCallParentheses="False" SpaceBetweenEmptyMethodCallParentheses="False" SpaceAfterControlFlowStatementKeyword="False" SpaceWithinExpressionParentheses="False" SpaceWithinCastParentheses="False" SpaceWithinOtherParentheses="False" SpaceAfterCast="False" SpacesIgnoreAroundVariableDeclaration="False" SpaceBeforeOpenSquareBracket="False" SpaceBetweenEmptySquareBrackets="False" SpaceWithinSquareBrackets="False" SpaceAfterColonInBaseTypeDeclaration="True" SpaceAfterComma="True" SpaceAfterDot="False" SpaceAfterSemicolonsInForStatement="True" SpaceBeforeColonInBaseTypeDeclaration="True" SpaceBeforeComma="False" SpaceBeforeDot="False" SpaceBeforeSemicolonsInForStatement="False" SpacingAroundBinaryOperator="Single" WrappingPreserveSingleLine="True" WrappingKeepStatementsOnSingleLine="True" PlaceSystemDirectiveFirst="True" NewLineForMembersInObjectInit="True" NewLineForMembersInAnonymousTypes="True" NewLineForClausesInQuery="True" scope="text/x-csharp">
|
||||||
<inheritsSet />
|
<inheritsSet />
|
||||||
<inheritsScope />
|
<inheritsScope />
|
||||||
</CSharpFormattingPolicy>
|
</CSharpFormattingPolicy>
|
||||||
|
|||||||
@@ -90,8 +90,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new AmigaRigidDiskBlock();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.AmigaDOSPlugin();
|
Filesystem fs = new DiscImageChef.Filesystems.AmigaDOSPlugin();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -102,7 +101,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -90,8 +90,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new MBR();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.AmigaDOSPlugin();
|
Filesystem fs = new DiscImageChef.Filesystems.AmigaDOSPlugin();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -102,7 +101,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// /***************************************************************************
|
// /***************************************************************************
|
||||||
// The Disc Image Chef
|
// The Disc Image Chef
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -64,7 +64,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
};
|
};
|
||||||
|
|
||||||
readonly long[] clusters = {
|
readonly long[] clusters = {
|
||||||
408240,408240,
|
406224,406224,
|
||||||
};
|
};
|
||||||
|
|
||||||
readonly int[] clustersize = {
|
readonly int[] clustersize = {
|
||||||
@@ -76,14 +76,13 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
};
|
};
|
||||||
|
|
||||||
readonly string[] volumeserial = {
|
readonly string[] volumeserial = {
|
||||||
null,null,
|
"A58348CE","A5833CD0",
|
||||||
};
|
};
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void Test()
|
public void Test()
|
||||||
{
|
{
|
||||||
throw new NotImplementedException("Partition schemes inside partitions are not yet implemented, and should be tested here.");
|
for(int i = 0; i < testfiles.Length; i++)
|
||||||
/* for(int i = 0; i < testfiles.Length; i++)
|
|
||||||
{
|
{
|
||||||
string location = Path.Combine(Consts.TestFilesRoot, "filesystems", "affs_mbr_rdb", testfiles[i]);
|
string location = Path.Combine(Consts.TestFilesRoot, "filesystems", "affs_mbr_rdb", testfiles[i]);
|
||||||
Filter filter = new LZip();
|
Filter filter = new LZip();
|
||||||
@@ -92,19 +91,18 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new MBR();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.AmigaDOSPlugin();
|
Filesystem fs = new DiscImageChef.Filesystems.AmigaDOSPlugin();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
{
|
{
|
||||||
if(partitions[j].PartitionType == "0x2D")
|
if(partitions[j].Type == "\"DOS\\1\"" || partitions[j].Type == "\"DOS\\3\"")
|
||||||
{
|
{
|
||||||
part = j;
|
part = j;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
@@ -112,7 +110,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual("Amiga FFS", fs.XmlFSType.Type, testfiles[i]);
|
Assert.AreEqual("Amiga FFS", fs.XmlFSType.Type, testfiles[i]);
|
||||||
Assert.AreEqual(volumename[i], fs.XmlFSType.VolumeName, testfiles[i]);
|
Assert.AreEqual(volumename[i], fs.XmlFSType.VolumeName, testfiles[i]);
|
||||||
Assert.AreEqual(volumeserial[i], fs.XmlFSType.VolumeSerial, testfiles[i]);
|
Assert.AreEqual(volumeserial[i], fs.XmlFSType.VolumeSerial, testfiles[i]);
|
||||||
}*/
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -97,8 +97,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new AmigaRigidDiskBlock();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.AmigaDOSPlugin();
|
Filesystem fs = new DiscImageChef.Filesystems.AmigaDOSPlugin();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -109,7 +108,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -90,8 +90,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new MBR();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.AmigaDOSPlugin();
|
Filesystem fs = new DiscImageChef.Filesystems.AmigaDOSPlugin();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -102,7 +101,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
};
|
};
|
||||||
|
|
||||||
readonly long[] clusters = {
|
readonly long[] clusters = {
|
||||||
408240,408240,
|
406224,406224,
|
||||||
};
|
};
|
||||||
|
|
||||||
readonly int[] clustersize = {
|
readonly int[] clustersize = {
|
||||||
@@ -76,35 +76,33 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
};
|
};
|
||||||
|
|
||||||
readonly string[] volumeserial = {
|
readonly string[] volumeserial = {
|
||||||
null,null,
|
"A5833C5B","A5833085",
|
||||||
};
|
};
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void Test()
|
public void Test()
|
||||||
{
|
{
|
||||||
throw new NotImplementedException("Partition schemes inside partitions are not yet implemented, and should be tested here.");
|
for(int i = 0; i < testfiles.Length; i++)
|
||||||
/* for(int i = 0; i < testfiles.Length; i++)
|
|
||||||
{
|
{
|
||||||
string location = Path.Combine(Consts.TestFilesRoot, "filesystems", "aofs_mbr", testfiles[i]);
|
string location = Path.Combine(Consts.TestFilesRoot, "filesystems", "aofs_mbr_rdb", testfiles[i]);
|
||||||
Filter filter = new LZip();
|
Filter filter = new LZip();
|
||||||
filter.Open(location);
|
filter.Open(location);
|
||||||
ImagePlugin image = new VDI();
|
ImagePlugin image = new VDI();
|
||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new MBR();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.AmigaDOSPlugin();
|
Filesystem fs = new DiscImageChef.Filesystems.AmigaDOSPlugin();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
{
|
{
|
||||||
if(partitions[j].PartitionType == "0x2C")
|
if(partitions[j].Type == "\"DOS\\0\"")
|
||||||
{
|
{
|
||||||
part = j;
|
part = j;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
@@ -112,7 +110,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual("Amiga OFS", fs.XmlFSType.Type, testfiles[i]);
|
Assert.AreEqual("Amiga OFS", fs.XmlFSType.Type, testfiles[i]);
|
||||||
Assert.AreEqual(volumename[i], fs.XmlFSType.VolumeName, testfiles[i]);
|
Assert.AreEqual(volumename[i], fs.XmlFSType.VolumeName, testfiles[i]);
|
||||||
Assert.AreEqual(volumeserial[i], fs.XmlFSType.VolumeSerial, testfiles[i]);
|
Assert.AreEqual(volumeserial[i], fs.XmlFSType.VolumeSerial, testfiles[i]);
|
||||||
}*/
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -90,8 +90,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new AmigaRigidDiskBlock();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.AmigaDOSPlugin();
|
Filesystem fs = new DiscImageChef.Filesystems.AmigaDOSPlugin();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -102,7 +101,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -92,8 +92,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new MBR();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.Atheros();
|
Filesystem fs = new DiscImageChef.Filesystems.Atheros();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -104,7 +103,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -94,8 +94,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new DiscImageChef.PartPlugins.AppleMap();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.BeFS();
|
Filesystem fs = new DiscImageChef.Filesystems.BeFS();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -106,7 +105,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -90,8 +90,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new GuidPartitionTable();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.BeFS();
|
Filesystem fs = new DiscImageChef.Filesystems.BeFS();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -102,7 +101,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -90,8 +90,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new MBR();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.BeFS();
|
Filesystem fs = new DiscImageChef.Filesystems.BeFS();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -102,7 +101,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new MBR();
|
PartPlugin parts = new MBR();
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions, 0), testfiles[i]);
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.F2FS();
|
Filesystem fs = new DiscImageChef.Filesystems.F2FS();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -102,7 +102,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -94,8 +94,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new DiscImageChef.PartPlugins.AppleMap();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.FAT();
|
Filesystem fs = new DiscImageChef.Filesystems.FAT();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -106,7 +105,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -94,8 +94,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new GuidPartitionTable();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.FAT();
|
Filesystem fs = new DiscImageChef.Filesystems.FAT();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -106,7 +105,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -214,8 +214,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new MBR();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new FAT();
|
Filesystem fs = new FAT();
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[0]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[0]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[0], out string information);
|
fs.GetInformation(image, partitions[0], out string information);
|
||||||
|
|||||||
@@ -94,8 +94,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new DiscImageChef.PartPlugins.AppleMap();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.FAT();
|
Filesystem fs = new DiscImageChef.Filesystems.FAT();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -106,7 +105,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -94,8 +94,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new AtariPartitions();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.FAT();
|
Filesystem fs = new DiscImageChef.Filesystems.FAT();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -106,7 +105,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -94,8 +94,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new GuidPartitionTable();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.FAT();
|
Filesystem fs = new DiscImageChef.Filesystems.FAT();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -106,7 +105,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -214,8 +214,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new MBR();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new FAT();
|
Filesystem fs = new FAT();
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[0]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[0]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[0], out string information);
|
fs.GetInformation(image, partitions[0], out string information);
|
||||||
|
|||||||
@@ -64,11 +64,11 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
};
|
};
|
||||||
|
|
||||||
readonly long[] clusters = {
|
readonly long[] clusters = {
|
||||||
1020064
|
63689
|
||||||
};
|
};
|
||||||
|
|
||||||
readonly int[] clustersize = {
|
readonly int[] clustersize = {
|
||||||
512,
|
8192,
|
||||||
};
|
};
|
||||||
|
|
||||||
readonly string[] volumename = {
|
readonly string[] volumename = {
|
||||||
@@ -76,7 +76,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
};
|
};
|
||||||
|
|
||||||
readonly string[] volumeserial = {
|
readonly string[] volumeserial = {
|
||||||
"UNKNOWN ",
|
"374D40D1",
|
||||||
};
|
};
|
||||||
|
|
||||||
readonly string[] oemid = {
|
readonly string[] oemid = {
|
||||||
@@ -86,8 +86,6 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
[Test]
|
[Test]
|
||||||
public void Test()
|
public void Test()
|
||||||
{
|
{
|
||||||
throw new NotImplementedException("Partition schemes inside partitions are not yet implemented, and should be tested here.");
|
|
||||||
/*
|
|
||||||
for(int i = 0; i < testfiles.Length; i++)
|
for(int i = 0; i < testfiles.Length; i++)
|
||||||
{
|
{
|
||||||
string location = Path.Combine(Consts.TestFilesRoot, "filesystems", "fat16_rdb", testfiles[i]);
|
string location = Path.Combine(Consts.TestFilesRoot, "filesystems", "fat16_rdb", testfiles[i]);
|
||||||
@@ -97,28 +95,27 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new AmigaRigidDiskBlock();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.FAT();
|
Filesystem fs = new DiscImageChef.Filesystems.FAT();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
{
|
{
|
||||||
if(partitions[j].PartitionType == "\"RES\\86\"")
|
if(partitions[j].Type == "0x06")
|
||||||
{
|
{
|
||||||
part = j;
|
part = j;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
Assert.AreEqual(clustersize[i], fs.XmlFSType.ClusterSize, testfiles[i]);
|
Assert.AreEqual(clustersize[i], fs.XmlFSType.ClusterSize, testfiles[i]);
|
||||||
Assert.AreEqual("Amiga FFS", fs.XmlFSType.Type, testfiles[i]);
|
Assert.AreEqual("FAT16", fs.XmlFSType.Type, testfiles[i]);
|
||||||
Assert.AreEqual(volumename[i], fs.XmlFSType.VolumeName, testfiles[i]);
|
Assert.AreEqual(volumename[i], fs.XmlFSType.VolumeName, testfiles[i]);
|
||||||
Assert.AreEqual(volumeserial[i], fs.XmlFSType.VolumeSerial, testfiles[i]);
|
Assert.AreEqual(volumeserial[i], fs.XmlFSType.VolumeSerial, testfiles[i]);
|
||||||
Assert.AreEqual(oemid[i], fs.XmlFSType.SystemIdentifier, testfiles[i]);
|
Assert.AreEqual(oemid[i], fs.XmlFSType.SystemIdentifier, testfiles[i]);
|
||||||
}*/
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -94,8 +94,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new DiscImageChef.PartPlugins.AppleMap();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.FAT();
|
Filesystem fs = new DiscImageChef.Filesystems.FAT();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -106,7 +105,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -94,8 +94,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new GuidPartitionTable();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.FAT();
|
Filesystem fs = new DiscImageChef.Filesystems.FAT();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -106,7 +105,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -126,8 +126,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new MBR();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new FAT();
|
Filesystem fs = new FAT();
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[0]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[0]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[0], out string information);
|
fs.GetInformation(image, partitions[0], out string information);
|
||||||
|
|||||||
@@ -93,8 +93,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new MBR();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.HAMMER();
|
Filesystem fs = new DiscImageChef.Filesystems.HAMMER();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -105,7 +104,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -135,8 +135,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new DiscImageChef.PartPlugins.AppleMap();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.AppleHFSPlus();
|
Filesystem fs = new DiscImageChef.Filesystems.AppleHFSPlus();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -147,7 +146,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -94,8 +94,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new GuidPartitionTable();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.AppleHFSPlus();
|
Filesystem fs = new DiscImageChef.Filesystems.AppleHFSPlus();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -106,7 +105,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -119,8 +119,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new MBR();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.AppleHFSPlus();
|
Filesystem fs = new DiscImageChef.Filesystems.AppleHFSPlus();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -131,7 +130,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -102,8 +102,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new DiscImageChef.PartPlugins.AppleMap();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.AppleHFSPlus();
|
Filesystem fs = new DiscImageChef.Filesystems.AppleHFSPlus();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -114,7 +113,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -94,8 +94,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new GuidPartitionTable();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.AppleHFSPlus();
|
Filesystem fs = new DiscImageChef.Filesystems.AppleHFSPlus();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -106,7 +105,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -102,8 +102,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new MBR();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.AppleHFSPlus();
|
Filesystem fs = new DiscImageChef.Filesystems.AppleHFSPlus();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -114,7 +113,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -153,8 +153,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new DiscImageChef.PartPlugins.AppleMap();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.AppleHFS();
|
Filesystem fs = new DiscImageChef.Filesystems.AppleHFS();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -165,7 +164,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -102,8 +102,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new DiscImageChef.PartPlugins.AppleMap();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.AppleHFS();
|
Filesystem fs = new DiscImageChef.Filesystems.AppleHFS();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -114,7 +113,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -97,8 +97,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new MBR();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.AppleHFS();
|
Filesystem fs = new DiscImageChef.Filesystems.AppleHFS();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -109,7 +108,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -64,11 +64,11 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
};
|
};
|
||||||
|
|
||||||
readonly long[] clusters = {
|
readonly long[] clusters = {
|
||||||
1020064
|
63752,
|
||||||
};
|
};
|
||||||
|
|
||||||
readonly int[] clustersize = {
|
readonly int[] clustersize = {
|
||||||
512,
|
8192,
|
||||||
};
|
};
|
||||||
|
|
||||||
readonly string[] volumename = {
|
readonly string[] volumename = {
|
||||||
@@ -82,8 +82,6 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
[Test]
|
[Test]
|
||||||
public void Test()
|
public void Test()
|
||||||
{
|
{
|
||||||
throw new NotImplementedException("Partition schemes inside partitions are not yet implemented, and should be tested here.");
|
|
||||||
/*
|
|
||||||
for(int i = 0; i < testfiles.Length; i++)
|
for(int i = 0; i < testfiles.Length; i++)
|
||||||
{
|
{
|
||||||
string location = Path.Combine(Consts.TestFilesRoot, "filesystems", "hfs_rdb", testfiles[i]);
|
string location = Path.Combine(Consts.TestFilesRoot, "filesystems", "hfs_rdb", testfiles[i]);
|
||||||
@@ -93,28 +91,26 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new AmigaRigidDiskBlock();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
Filesystem fs = new DiscImageChef.Filesystems.AppleHFS();
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.FAT();
|
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
{
|
{
|
||||||
if(partitions[j].PartitionType == "\"RES\\86\"")
|
if(partitions[j].Type == "\"RES\\86\"")
|
||||||
{
|
{
|
||||||
part = j;
|
part = j;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
Assert.AreEqual(clustersize[i], fs.XmlFSType.ClusterSize, testfiles[i]);
|
Assert.AreEqual(clustersize[i], fs.XmlFSType.ClusterSize, testfiles[i]);
|
||||||
Assert.AreEqual("Amiga FFS", fs.XmlFSType.Type, testfiles[i]);
|
Assert.AreEqual("HFS", fs.XmlFSType.Type, testfiles[i]);
|
||||||
Assert.AreEqual(volumename[i], fs.XmlFSType.VolumeName, testfiles[i]);
|
Assert.AreEqual(volumename[i], fs.XmlFSType.VolumeName, testfiles[i]);
|
||||||
Assert.AreEqual(volumeserial[i], fs.XmlFSType.VolumeSerial, testfiles[i]);
|
Assert.AreEqual(volumeserial[i], fs.XmlFSType.VolumeSerial, testfiles[i]);
|
||||||
Assert.AreEqual(oemid[i], fs.XmlFSType.SystemIdentifier, testfiles[i]);
|
}
|
||||||
}*/
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -110,8 +110,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new MBR();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.HPFS();
|
Filesystem fs = new DiscImageChef.Filesystems.HPFS();
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[0]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[0]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[0], out string information);
|
fs.GetInformation(image, partitions[0], out string information);
|
||||||
|
|||||||
@@ -90,8 +90,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new MBR();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.JFS();
|
Filesystem fs = new DiscImageChef.Filesystems.JFS();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -102,7 +101,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -93,8 +93,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new MBR();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.LFS();
|
Filesystem fs = new DiscImageChef.Filesystems.LFS();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -105,7 +104,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
};
|
};
|
||||||
|
|
||||||
readonly ulong[] sectors = {
|
readonly ulong[] sectors = {
|
||||||
262144,262144,
|
262144,102400,
|
||||||
};
|
};
|
||||||
|
|
||||||
readonly uint[] sectorsize = {
|
readonly uint[] sectorsize = {
|
||||||
@@ -82,8 +82,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new MBR();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.MinixFS();
|
Filesystem fs = new DiscImageChef.Filesystems.MinixFS();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -94,7 +93,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -82,8 +82,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new MBR();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.MinixFS();
|
Filesystem fs = new DiscImageChef.Filesystems.MinixFS();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -94,7 +93,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -82,8 +82,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new MBR();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.MinixFS();
|
Filesystem fs = new DiscImageChef.Filesystems.MinixFS();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -94,7 +93,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -90,8 +90,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new MBR();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.NILFS2();
|
Filesystem fs = new DiscImageChef.Filesystems.NILFS2();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -102,7 +101,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -96,8 +96,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new GuidPartitionTable();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.NTFS();
|
Filesystem fs = new DiscImageChef.Filesystems.NTFS();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -108,7 +107,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -110,8 +110,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new MBR();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.NTFS();
|
Filesystem fs = new DiscImageChef.Filesystems.NTFS();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -124,7 +123,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -93,8 +93,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new MBR();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.NetWare();
|
Filesystem fs = new DiscImageChef.Filesystems.NetWare();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -105,7 +104,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -93,8 +93,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new MBR();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.OCFS2();
|
Filesystem fs = new DiscImageChef.Filesystems.OCFS2();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -105,7 +104,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -94,8 +94,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new AmigaRigidDiskBlock();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.PFS();
|
Filesystem fs = new DiscImageChef.Filesystems.PFS();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -106,7 +105,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -97,8 +97,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new DiscImageChef.PartPlugins.AppleMap();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.ProDOSPlugin();
|
Filesystem fs = new DiscImageChef.Filesystems.ProDOSPlugin();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -109,7 +108,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -82,8 +82,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new MBR();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.QNX4();
|
Filesystem fs = new DiscImageChef.Filesystems.QNX4();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -94,7 +93,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -96,8 +96,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new MBR();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
{
|
{
|
||||||
@@ -107,7 +106,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
throw new NotImplementedException("ReFS is not yet implemented");
|
throw new NotImplementedException("ReFS is not yet implemented");
|
||||||
/*
|
/*
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.ReFS();
|
Filesystem fs = new DiscImageChef.Filesystems.ReFS();
|
||||||
|
|||||||
@@ -86,8 +86,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new MBR();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.Reiser();
|
Filesystem fs = new DiscImageChef.Filesystems.Reiser();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -98,7 +97,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -90,8 +90,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new MBR();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.Reiser4();
|
Filesystem fs = new DiscImageChef.Filesystems.Reiser4();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -102,7 +101,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -90,8 +90,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new MBR();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.SFS();
|
Filesystem fs = new DiscImageChef.Filesystems.SFS();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -102,7 +101,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
};
|
};
|
||||||
|
|
||||||
readonly long[] clusters = {
|
readonly long[] clusters = {
|
||||||
408240,
|
406224,
|
||||||
};
|
};
|
||||||
|
|
||||||
readonly int[] clustersize = {
|
readonly int[] clustersize = {
|
||||||
@@ -82,8 +82,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
[Test]
|
[Test]
|
||||||
public void Test()
|
public void Test()
|
||||||
{
|
{
|
||||||
throw new NotImplementedException("Partition schemes inside partitions are not yet implemented, and should be tested here.");
|
for(int i = 0; i < testfiles.Length; i++)
|
||||||
/* for(int i = 0; i < testfiles.Length; i++)
|
|
||||||
{
|
{
|
||||||
string location = Path.Combine(Consts.TestFilesRoot, "filesystems", "sfs_mbr_rdb", testfiles[i]);
|
string location = Path.Combine(Consts.TestFilesRoot, "filesystems", "sfs_mbr_rdb", testfiles[i]);
|
||||||
Filter filter = new LZip();
|
Filter filter = new LZip();
|
||||||
@@ -92,19 +91,18 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new MBR();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
Filesystem fs = new DiscImageChef.Filesystems.SFS();
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.AmigaDOSPlugin();
|
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
{
|
{
|
||||||
if(partitions[j].PartitionType == "SFS")
|
if(partitions[j].Type == "\"SFS\\0\"")
|
||||||
{
|
{
|
||||||
part = j;
|
part = j;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
@@ -112,7 +110,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual("SmartFileSystem", fs.XmlFSType.Type, testfiles[i]);
|
Assert.AreEqual("SmartFileSystem", fs.XmlFSType.Type, testfiles[i]);
|
||||||
Assert.AreEqual(volumename[i], fs.XmlFSType.VolumeName, testfiles[i]);
|
Assert.AreEqual(volumename[i], fs.XmlFSType.VolumeName, testfiles[i]);
|
||||||
Assert.AreEqual(volumeserial[i], fs.XmlFSType.VolumeSerial, testfiles[i]);
|
Assert.AreEqual(volumeserial[i], fs.XmlFSType.VolumeSerial, testfiles[i]);
|
||||||
}*/
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -90,8 +90,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new AmigaRigidDiskBlock();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.SFS();
|
Filesystem fs = new DiscImageChef.Filesystems.SFS();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -102,7 +101,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -94,8 +94,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new MBR();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.SysVfs();
|
Filesystem fs = new DiscImageChef.Filesystems.SysVfs();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -106,7 +105,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -94,8 +94,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new AmigaRigidDiskBlock();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.SysVfs();
|
Filesystem fs = new DiscImageChef.Filesystems.SysVfs();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -106,7 +105,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -110,8 +110,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new DiscImageChef.PartPlugins.AppleMap();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.FFSPlugin();
|
Filesystem fs = new DiscImageChef.Filesystems.FFSPlugin();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -122,7 +121,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -150,19 +150,19 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new MBR();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.FFSPlugin();
|
Filesystem fs = new DiscImageChef.Filesystems.FFSPlugin();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
{
|
{
|
||||||
if(partitions[j].Type == "0x63" || partitions[j].Type == "0xA8" || partitions[j].Type == "0xA5" || partitions[j].Type == "0xA9")
|
if(partitions[j].Type == "0x63" || partitions[j].Type == "0xA8" || partitions[j].Type == "0xA5" || partitions[j].Type == "0xA9" ||
|
||||||
|
partitions[j].Type == "0x83")
|
||||||
{
|
{
|
||||||
part = j;
|
part = j;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -102,8 +102,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new NeXTDisklabel();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.FFSPlugin();
|
Filesystem fs = new DiscImageChef.Filesystems.FFSPlugin();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -114,7 +113,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -126,8 +126,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new NeXTDisklabel();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.FFSPlugin();
|
Filesystem fs = new DiscImageChef.Filesystems.FFSPlugin();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -138,7 +137,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -94,8 +94,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new AmigaRigidDiskBlock();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.FFSPlugin();
|
Filesystem fs = new DiscImageChef.Filesystems.FFSPlugin();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -106,7 +105,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -94,8 +94,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new SunDisklabel();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.FFSPlugin();
|
Filesystem fs = new DiscImageChef.Filesystems.FFSPlugin();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -106,7 +105,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -86,8 +86,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new MBR();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.BFS();
|
Filesystem fs = new DiscImageChef.Filesystems.BFS();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -98,7 +97,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -94,8 +94,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new AmigaRigidDiskBlock();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.BFS();
|
Filesystem fs = new DiscImageChef.Filesystems.BFS();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -106,7 +105,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -90,8 +90,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new MBR();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.XFS();
|
Filesystem fs = new DiscImageChef.Filesystems.XFS();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -102,7 +101,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new MBR();
|
PartPlugin parts = new MBR();
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions, 0), testfiles[i]);
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.BTRFS();
|
Filesystem fs = new DiscImageChef.Filesystems.BTRFS();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -102,7 +102,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -90,8 +90,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new DiscImageChef.PartPlugins.AppleMap();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.exFAT();
|
Filesystem fs = new DiscImageChef.Filesystems.exFAT();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -102,7 +101,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -90,8 +90,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new GuidPartitionTable();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.exFAT();
|
Filesystem fs = new DiscImageChef.Filesystems.exFAT();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -102,7 +101,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -90,8 +90,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new MBR();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.exFAT();
|
Filesystem fs = new DiscImageChef.Filesystems.exFAT();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -102,7 +101,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]);
|
||||||
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]);
|
||||||
PartPlugin parts = new MBR();
|
PartPlugin parts = new MBR();
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions, 0), testfiles[i]);
|
||||||
Filesystem fs = new DiscImageChef.Filesystems.ext2FS();
|
Filesystem fs = new DiscImageChef.Filesystems.ext2FS();
|
||||||
int part = -1;
|
int part = -1;
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
@@ -114,7 +114,7 @@ namespace DiscImageChef.Tests.Filesystems
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.AreNotEqual(-1, part, "Partition not found");
|
Assert.AreNotEqual(-1, part, string.Format("Partition not found on {0}", testfiles[i]));
|
||||||
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
|
||||||
fs.GetInformation(image, partitions[part], out string information);
|
fs.GetInformation(image, partitions[part], out string information);
|
||||||
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]);
|
||||||
|
|||||||
@@ -79,8 +79,7 @@ namespace DiscImageChef.Tests.Partitions
|
|||||||
filter.Open(location);
|
filter.Open(location);
|
||||||
ImagePlugin image = new VDI();
|
ImagePlugin image = new VDI();
|
||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
PartPlugin parts = new DiscImageChef.PartPlugins.Acorn();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Assert.AreEqual(wanted[i].Length, partitions.Count, testfiles[i]);
|
Assert.AreEqual(wanted[i].Length, partitions.Count, testfiles[i]);
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ using DiscImageChef.Filters;
|
|||||||
using DiscImageChef.ImagePlugins;
|
using DiscImageChef.ImagePlugins;
|
||||||
using DiscImageChef.PartPlugins;
|
using DiscImageChef.PartPlugins;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
|
using DiscImageChef.Core;
|
||||||
|
|
||||||
namespace DiscImageChef.Tests.Partitions
|
namespace DiscImageChef.Tests.Partitions
|
||||||
{
|
{
|
||||||
@@ -207,10 +208,10 @@ namespace DiscImageChef.Tests.Partitions
|
|||||||
Sequence = 8, Start = 35542 },
|
Sequence = 8, Start = 35542 },
|
||||||
new Partition{ Description = null, Size = 1766400, Name = "Usr file system", Type = "Apple_UNIX_SVR2", Offset = 24734720, Length = 3450,
|
new Partition{ Description = null, Size = 1766400, Name = "Usr file system", Type = "Apple_UNIX_SVR2", Offset = 24734720, Length = 3450,
|
||||||
Sequence = 9, Start = 48310 },
|
Sequence = 9, Start = 48310 },
|
||||||
new Partition{ Description = null, Size = 1558528, Name = "Random A/UX fs", Type = "Apple_UNIX_SVR2", Offset = 26519552, Length = 3044,
|
|
||||||
Sequence = 10, Start = 51796 },
|
|
||||||
new Partition{ Description = null, Size = 18432, Name = "Extra", Type = "Apple_Free", Offset = 26501120, Length = 36,
|
new Partition{ Description = null, Size = 18432, Name = "Extra", Type = "Apple_Free", Offset = 26501120, Length = 36,
|
||||||
Sequence = 11, Start = 51760 },
|
Sequence = 10, Start = 51760 },
|
||||||
|
new Partition{ Description = null, Size = 1558528, Name = "Random A/UX fs", Type = "Apple_UNIX_SVR2", Offset = 26519552, Length = 3044,
|
||||||
|
Sequence = 11, Start = 51796 },
|
||||||
},
|
},
|
||||||
// Mac OS 6.0.4
|
// Mac OS 6.0.4
|
||||||
new []{
|
new []{
|
||||||
@@ -276,10 +277,10 @@ namespace DiscImageChef.Tests.Partitions
|
|||||||
new []{
|
new []{
|
||||||
new Partition{ Description = null, Size = 5120, Name = null, Type = "Apple_Driver", Offset = 32768, Length = 10,
|
new Partition{ Description = null, Size = 5120, Name = null, Type = "Apple_Driver", Offset = 32768, Length = 10,
|
||||||
Sequence = 0, Start = 64 },
|
Sequence = 0, Start = 64 },
|
||||||
new Partition{ Description = null, Size = 14013952, Name = "MacOS", Type = "Apple_HFS", Offset = 49152, Length = 27371,
|
|
||||||
Sequence = 1, Start = 96 },
|
|
||||||
new Partition{ Description = null, Size = 16384, Name = "Macintosh", Type = "Apple_Driver", Offset = 32768, Length = 32,
|
new Partition{ Description = null, Size = 16384, Name = "Macintosh", Type = "Apple_Driver", Offset = 32768, Length = 32,
|
||||||
Sequence = 2, Start = 64 },
|
Sequence = 1, Start = 64 },
|
||||||
|
new Partition{ Description = null, Size = 14013952, Name = "MacOS", Type = "Apple_HFS", Offset = 49152, Length = 27371,
|
||||||
|
Sequence = 2, Start = 96 },
|
||||||
new Partition{ Description = null, Size = 1492992, Name = "Eschatology 1", Type = "Apple_UNIX_SVR2", Offset = 14063104, Length = 2916,
|
new Partition{ Description = null, Size = 1492992, Name = "Eschatology 1", Type = "Apple_UNIX_SVR2", Offset = 14063104, Length = 2916,
|
||||||
Sequence = 3, Start = 27467 },
|
Sequence = 3, Start = 27467 },
|
||||||
new Partition{ Description = null, Size = 919040, Name = "A/UX Root", Type = "Apple_UNIX_SVR2", Offset = 15556096, Length = 1795,
|
new Partition{ Description = null, Size = 919040, Name = "A/UX Root", Type = "Apple_UNIX_SVR2", Offset = 15556096, Length = 1795,
|
||||||
@@ -298,10 +299,10 @@ namespace DiscImageChef.Tests.Partitions
|
|||||||
Sequence = 10, Start = 47321 },
|
Sequence = 10, Start = 47321 },
|
||||||
new Partition{ Description = null, Size = 798208, Name = "Unreserved 3", Type = "Apple_UNIX_SVR2", Offset = 24883712, Length = 1559,
|
new Partition{ Description = null, Size = 798208, Name = "Unreserved 3", Type = "Apple_UNIX_SVR2", Offset = 24883712, Length = 1559,
|
||||||
Sequence = 11, Start = 48601 },
|
Sequence = 11, Start = 48601 },
|
||||||
new Partition{ Description = null, Size = 2252800, Name = "Unreserved 4", Type = "Apple_UNIX_SVR2", Offset = 25825280, Length = 4400,
|
|
||||||
Sequence = 12, Start = 50440 },
|
|
||||||
new Partition{ Description = null, Size = 143360, Name = "Extra", Type = "Apple_Free", Offset = 25681920, Length = 280,
|
new Partition{ Description = null, Size = 143360, Name = "Extra", Type = "Apple_Free", Offset = 25681920, Length = 280,
|
||||||
Sequence = 13, Start = 50160 },
|
Sequence = 12, Start = 50160 },
|
||||||
|
new Partition{ Description = null, Size = 2252800, Name = "Unreserved 4", Type = "Apple_UNIX_SVR2", Offset = 25825280, Length = 4400,
|
||||||
|
Sequence = 13, Start = 50440 },
|
||||||
},
|
},
|
||||||
// Mac OS 6.0.8
|
// Mac OS 6.0.8
|
||||||
new []{
|
new []{
|
||||||
@@ -315,26 +316,26 @@ namespace DiscImageChef.Tests.Partitions
|
|||||||
Sequence = 3, Start = 9033 },
|
Sequence = 3, Start = 9033 },
|
||||||
new Partition{ Description = null, Size = 3020800, Name = "Eschatology 1", Type = "Apple_UNIX_SVR2", Offset = 5768704, Length = 5900,
|
new Partition{ Description = null, Size = 3020800, Name = "Eschatology 1", Type = "Apple_UNIX_SVR2", Offset = 5768704, Length = 5900,
|
||||||
Sequence = 4, Start = 11267 },
|
Sequence = 4, Start = 11267 },
|
||||||
new Partition{ Description = null, Size = 2091520, Name = "A/UX Root", Type = "Apple_UNIX_SVR2", Offset = 25986560, Length = 4085,
|
|
||||||
Sequence = 5, Start = 50755 },
|
|
||||||
new Partition{ Description = null, Size = 3693056, Name = "Swap", Type = "Apple_UNIX_SVR2", Offset = 22293504, Length = 7213,
|
|
||||||
Sequence = 6, Start = 43542 },
|
|
||||||
new Partition{ Description = null, Size = 2308096, Name = "Root file system", Type = "Apple_UNIX_SVR2", Offset = 19985408, Length = 4508,
|
|
||||||
Sequence = 7, Start = 39034 },
|
|
||||||
new Partition{ Description = null, Size = 2885120, Name = "Usr file system", Type = "Apple_UNIX_SVR2", Offset = 17100288, Length = 5635,
|
|
||||||
Sequence = 8, Start = 33399 },
|
|
||||||
new Partition{ Description = null, Size = 1615872, Name = "Unreserved 1", Type = "Apple_UNIX_SVR2", Offset = 8789504, Length = 3156,
|
new Partition{ Description = null, Size = 1615872, Name = "Unreserved 1", Type = "Apple_UNIX_SVR2", Offset = 8789504, Length = 3156,
|
||||||
Sequence = 9, Start = 17167 },
|
Sequence = 5, Start = 17167 },
|
||||||
|
new Partition{ Description = null, Size = 1384960, Name = "Unreserved 3", Type = "Apple_UNIX_SVR2", Offset = 10405376, Length = 2705,
|
||||||
|
Sequence = 6, Start = 20323 },
|
||||||
|
new Partition{ Description = null, Size = 952832, Name = "Unreserved 4", Type = "Apple_UNIX_SVR2", Offset = 11790336, Length = 1861,
|
||||||
|
Sequence = 7, Start = 23028 },
|
||||||
|
new Partition{ Description = null, Size = 1246208, Name = "Extra", Type = "Apple_Free", Offset = 12743168, Length = 2434,
|
||||||
|
Sequence = 8, Start = 24889 },
|
||||||
|
new Partition{ Description = null, Size = 1495040, Name = "Random A/UX fs", Type = "Apple_UNIX_SVR2", Offset = 13989376, Length = 2920,
|
||||||
|
Sequence = 9, Start = 27323 },
|
||||||
new Partition{ Description = null, Size = 1615872, Name = "Unreserved 2", Type = "Apple_UNIX_SVR2", Offset = 15484416, Length = 3156,
|
new Partition{ Description = null, Size = 1615872, Name = "Unreserved 2", Type = "Apple_UNIX_SVR2", Offset = 15484416, Length = 3156,
|
||||||
Sequence = 10, Start = 30243 },
|
Sequence = 10, Start = 30243 },
|
||||||
new Partition{ Description = null, Size = 1384960, Name = "Unreserved 3", Type = "Apple_UNIX_SVR2", Offset = 10405376, Length = 2705,
|
new Partition{ Description = null, Size = 2885120, Name = "Usr file system", Type = "Apple_UNIX_SVR2", Offset = 17100288, Length = 5635,
|
||||||
Sequence = 11, Start = 20323 },
|
Sequence = 11, Start = 33399 },
|
||||||
new Partition{ Description = null, Size = 952832, Name = "Unreserved 4", Type = "Apple_UNIX_SVR2", Offset = 11790336, Length = 1861,
|
new Partition{ Description = null, Size = 2308096, Name = "Root file system", Type = "Apple_UNIX_SVR2", Offset = 19985408, Length = 4508,
|
||||||
Sequence = 12, Start = 23028 },
|
Sequence = 12, Start = 39034 },
|
||||||
new Partition{ Description = null, Size = 1495040, Name = "Random A/UX fs", Type = "Apple_UNIX_SVR2", Offset = 13989376, Length = 2920,
|
new Partition{ Description = null, Size = 3693056, Name = "Swap", Type = "Apple_UNIX_SVR2", Offset = 22293504, Length = 7213,
|
||||||
Sequence = 13, Start = 27323 },
|
Sequence = 13, Start = 43542 },
|
||||||
new Partition{ Description = null, Size = 1246208, Name = "Extra", Type = "Apple_Free", Offset = 12743168, Length = 2434,
|
new Partition{ Description = null, Size = 2091520, Name = "A/UX Root", Type = "Apple_UNIX_SVR2", Offset = 25986560, Length = 4085,
|
||||||
Sequence = 14, Start = 24889 },
|
Sequence = 14, Start = 50755 },
|
||||||
},
|
},
|
||||||
// Mac OS 6.0
|
// Mac OS 6.0
|
||||||
new []{
|
new []{
|
||||||
@@ -369,22 +370,22 @@ namespace DiscImageChef.Tests.Partitions
|
|||||||
Sequence = 0, Start = 64 },
|
Sequence = 0, Start = 64 },
|
||||||
new Partition{ Description = null, Size = 16384, Name = "Macintosh", Type = "Apple_Driver", Offset = 32768, Length = 32,
|
new Partition{ Description = null, Size = 16384, Name = "Macintosh", Type = "Apple_Driver", Offset = 32768, Length = 32,
|
||||||
Sequence = 1, Start = 64 },
|
Sequence = 1, Start = 64 },
|
||||||
new Partition{ Description = null, Size = 5262336, Name = "MacOS", Type = "Apple_HFS", Offset = 15845888, Length = 10278,
|
|
||||||
Sequence = 2, Start = 30949 },
|
|
||||||
new Partition{ Description = null, Size = 3073024, Name = "Scratch", Type = "Apple_Scratch", Offset = 49152, Length = 6002,
|
new Partition{ Description = null, Size = 3073024, Name = "Scratch", Type = "Apple_Scratch", Offset = 49152, Length = 6002,
|
||||||
Sequence = 3, Start = 96 },
|
Sequence = 2, Start = 96 },
|
||||||
new Partition{ Description = null, Size = 1707520, Name = "Eschatology 1", Type = "Apple_UNIX_SVR2", Offset = 21108224, Length = 3335,
|
|
||||||
Sequence = 4, Start = 41227 },
|
|
||||||
new Partition{ Description = null, Size = 5262336, Name = "Extra", Type = "Apple_Free", Offset = 22815744, Length = 10278,
|
|
||||||
Sequence = 5, Start = 44562 },
|
|
||||||
new Partition{ Description = null, Size = 2726400, Name = "Root file system", Type = "Apple_UNIX_SVR2", Offset = 3122176, Length = 5325,
|
new Partition{ Description = null, Size = 2726400, Name = "Root file system", Type = "Apple_UNIX_SVR2", Offset = 3122176, Length = 5325,
|
||||||
Sequence = 6, Start = 6098 },
|
Sequence = 3, Start = 6098 },
|
||||||
new Partition{ Description = null, Size = 3180544, Name = "Extra", Type = "Apple_Free", Offset = 5848576, Length = 6212,
|
new Partition{ Description = null, Size = 3180544, Name = "Extra", Type = "Apple_Free", Offset = 5848576, Length = 6212,
|
||||||
Sequence = 7, Start = 11423 },
|
Sequence = 4, Start = 11423 },
|
||||||
new Partition{ Description = null, Size = 4203520, Name = "Random A/UX fs", Type = "Apple_UNIX_SVR2", Offset = 9029120, Length = 8210,
|
new Partition{ Description = null, Size = 4203520, Name = "Random A/UX fs", Type = "Apple_UNIX_SVR2", Offset = 9029120, Length = 8210,
|
||||||
Sequence = 8, Start = 17635 },
|
Sequence = 5, Start = 17635 },
|
||||||
new Partition{ Description = null, Size = 2613248, Name = "Extra", Type = "Apple_Free", Offset = 13232640, Length = 5104,
|
new Partition{ Description = null, Size = 2613248, Name = "Extra", Type = "Apple_Free", Offset = 13232640, Length = 5104,
|
||||||
Sequence = 9, Start = 25845 },
|
Sequence = 6, Start = 25845 },
|
||||||
|
new Partition{ Description = null, Size = 5262336, Name = "MacOS", Type = "Apple_HFS", Offset = 15845888, Length = 10278,
|
||||||
|
Sequence = 7, Start = 30949 },
|
||||||
|
new Partition{ Description = null, Size = 1707520, Name = "Eschatology 1", Type = "Apple_UNIX_SVR2", Offset = 21108224, Length = 3335,
|
||||||
|
Sequence = 8, Start = 41227 },
|
||||||
|
new Partition{ Description = null, Size = 5262336, Name = "Extra", Type = "Apple_Free", Offset = 22815744, Length = 10278,
|
||||||
|
Sequence = 9, Start = 44562 },
|
||||||
},
|
},
|
||||||
// Mac OS 7.1.1
|
// Mac OS 7.1.1
|
||||||
new []{
|
new []{
|
||||||
@@ -392,24 +393,24 @@ namespace DiscImageChef.Tests.Partitions
|
|||||||
Sequence = 0, Start = 64 },
|
Sequence = 0, Start = 64 },
|
||||||
new Partition{ Description = null, Size = 16384, Name = "Macintosh", Type = "Apple_Driver43", Offset = 32768, Length = 32,
|
new Partition{ Description = null, Size = 16384, Name = "Macintosh", Type = "Apple_Driver43", Offset = 32768, Length = 32,
|
||||||
Sequence = 1, Start = 64 },
|
Sequence = 1, Start = 64 },
|
||||||
new Partition{ Description = null, Size = 5148160, Name = "MacOS", Type = "Apple_HFS", Offset = 7294464, Length = 10055,
|
|
||||||
Sequence = 2, Start = 14247 },
|
|
||||||
new Partition{ Description = null, Size = 2097152, Name = "ProDOS", Type = "Apple_PRODOS", Offset = 5197312, Length = 4096,
|
|
||||||
Sequence = 3, Start = 10151 },
|
|
||||||
new Partition{ Description = null, Size = 3996672, Name = "A/UX Root", Type = "Apple_UNIX_SVR2", Offset = 24081408, Length = 7806,
|
|
||||||
Sequence = 4, Start = 47034 },
|
|
||||||
new Partition{ Description = null, Size = 1486848, Name = "Random A/UX fs", Type = "Apple_UNIX_SVR2", Offset = 49152, Length = 2904,
|
new Partition{ Description = null, Size = 1486848, Name = "Random A/UX fs", Type = "Apple_UNIX_SVR2", Offset = 49152, Length = 2904,
|
||||||
Sequence = 5, Start = 96 },
|
Sequence = 2, Start = 96 },
|
||||||
new Partition{ Description = null, Size = 4406784, Name = "Extra", Type = "Apple_Free", Offset = 12442624, Length = 8607,
|
|
||||||
Sequence = 6, Start = 24302 },
|
|
||||||
new Partition{ Description = null, Size = 2485760, Name = "Random A/UX fs", Type = "Apple_UNIX_SVR2", Offset = 16849408, Length = 4855,
|
|
||||||
Sequence = 7, Start = 32909 },
|
|
||||||
new Partition{ Description = null, Size = 4746240, Name = "Extra", Type = "Apple_Free", Offset = 19335168, Length = 9270,
|
|
||||||
Sequence = 8, Start = 37764 },
|
|
||||||
new Partition{ Description = null, Size = 2097152, Name = "ProDOS", Type = "Apple_PRODOS", Offset = 1536000, Length = 4096,
|
new Partition{ Description = null, Size = 2097152, Name = "ProDOS", Type = "Apple_PRODOS", Offset = 1536000, Length = 4096,
|
||||||
Sequence = 9, Start = 3000 },
|
Sequence = 3, Start = 3000 },
|
||||||
new Partition{ Description = null, Size = 1564160, Name = "Extra", Type = "Apple_Free", Offset = 3633152, Length = 3055,
|
new Partition{ Description = null, Size = 1564160, Name = "Extra", Type = "Apple_Free", Offset = 3633152, Length = 3055,
|
||||||
Sequence = 10, Start = 7096 },
|
Sequence = 4, Start = 7096 },
|
||||||
|
new Partition{ Description = null, Size = 2097152, Name = "ProDOS", Type = "Apple_PRODOS", Offset = 5197312, Length = 4096,
|
||||||
|
Sequence = 5, Start = 10151 },
|
||||||
|
new Partition{ Description = null, Size = 5148160, Name = "MacOS", Type = "Apple_HFS", Offset = 7294464, Length = 10055,
|
||||||
|
Sequence = 6, Start = 14247 },
|
||||||
|
new Partition{ Description = null, Size = 4406784, Name = "Extra", Type = "Apple_Free", Offset = 12442624, Length = 8607,
|
||||||
|
Sequence = 7, Start = 24302 },
|
||||||
|
new Partition{ Description = null, Size = 2485760, Name = "Random A/UX fs", Type = "Apple_UNIX_SVR2", Offset = 16849408, Length = 4855,
|
||||||
|
Sequence = 8, Start = 32909 },
|
||||||
|
new Partition{ Description = null, Size = 4746240, Name = "Extra", Type = "Apple_Free", Offset = 19335168, Length = 9270,
|
||||||
|
Sequence = 9, Start = 37764 },
|
||||||
|
new Partition{ Description = null, Size = 3996672, Name = "A/UX Root", Type = "Apple_UNIX_SVR2", Offset = 24081408, Length = 7806,
|
||||||
|
Sequence = 10, Start = 47034 },
|
||||||
},
|
},
|
||||||
// Mac OS 7.5
|
// Mac OS 7.5
|
||||||
new []{
|
new []{
|
||||||
@@ -422,21 +423,21 @@ namespace DiscImageChef.Tests.Partitions
|
|||||||
},
|
},
|
||||||
// GNU Parted
|
// GNU Parted
|
||||||
new []{
|
new []{
|
||||||
new Partition{ Description = null, Size = 47185920, Name = "untitled", Type = "Apple_HFS", Offset = 2097152, Length = 92160,
|
|
||||||
Sequence = 0, Start = 4096 },
|
|
||||||
new Partition{ Description = null, Size = 84934656, Name = "untitled", Type = "Apple_UNIX_SVR2", Offset = 49283072, Length = 165888,
|
|
||||||
Sequence = 1, Start = 96256 },
|
|
||||||
new Partition{ Description = null, Size = 2064384, Name = "Extra", Type = "Apple_Free", Offset = 32768, Length = 4032,
|
new Partition{ Description = null, Size = 2064384, Name = "Extra", Type = "Apple_Free", Offset = 32768, Length = 4032,
|
||||||
Sequence = 2, Start = 64 },
|
Sequence = 0, Start = 64 },
|
||||||
|
new Partition{ Description = null, Size = 47185920, Name = "untitled", Type = "Apple_HFS", Offset = 2097152, Length = 92160,
|
||||||
|
Sequence = 1, Start = 4096 },
|
||||||
|
new Partition{ Description = null, Size = 84934656, Name = "untitled", Type = "Apple_UNIX_SVR2", Offset = 49283072, Length = 165888,
|
||||||
|
Sequence = 2, Start = 96256 },
|
||||||
},
|
},
|
||||||
// Silverlining 2.2.1
|
// Silverlining 2.2.1
|
||||||
new []{
|
new []{
|
||||||
new Partition{ Description = null, Size = 3072, Name = null, Type = "Apple_Driver", Offset = 32768, Length = 6,
|
new Partition{ Description = null, Size = 3072, Name = null, Type = "Apple_Driver", Offset = 32768, Length = 6,
|
||||||
Sequence = 0, Start = 64 },
|
Sequence = 0, Start = 64 },
|
||||||
new Partition{ Description = null, Size = 25088, Name = null, Type = "Apple_Driver", Offset = 98304, Length = 49,
|
|
||||||
Sequence = 1, Start = 192 },
|
|
||||||
new Partition{ Description = null, Size = 65536, Name = "Macintosh_SL", Type = "Apple_Driver43", Offset = 32768, Length = 128,
|
new Partition{ Description = null, Size = 65536, Name = "Macintosh_SL", Type = "Apple_Driver43", Offset = 32768, Length = 128,
|
||||||
Sequence = 2, Start = 64 },
|
Sequence = 1, Start = 64 },
|
||||||
|
new Partition{ Description = null, Size = 25088, Name = null, Type = "Apple_Driver", Offset = 98304, Length = 49,
|
||||||
|
Sequence = 2, Start = 192 },
|
||||||
new Partition{ Description = null, Size = 65536, Name = "Macintosh_SL", Type = "Apple_Driver_ATA", Offset = 98304, Length = 128,
|
new Partition{ Description = null, Size = 65536, Name = "Macintosh_SL", Type = "Apple_Driver_ATA", Offset = 98304, Length = 128,
|
||||||
Sequence = 3, Start = 192 },
|
Sequence = 3, Start = 192 },
|
||||||
new Partition{ Description = null, Size = 25804800, Name = "Untitled #1", Type = "Apple_HFS", Offset = 163840, Length = 50400,
|
new Partition{ Description = null, Size = 25804800, Name = "Untitled #1", Type = "Apple_HFS", Offset = 163840, Length = 50400,
|
||||||
@@ -481,8 +482,7 @@ namespace DiscImageChef.Tests.Partitions
|
|||||||
filter.Open(location);
|
filter.Open(location);
|
||||||
ImagePlugin image = new VDI();
|
ImagePlugin image = new VDI();
|
||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
PartPlugin parts = new DiscImageChef.PartPlugins.AppleMap();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Assert.AreEqual(wanted[i].Length, partitions.Count, testfiles[i]);
|
Assert.AreEqual(wanted[i].Length, partitions.Count, testfiles[i]);
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -122,8 +122,7 @@ namespace DiscImageChef.Tests.Partitions
|
|||||||
filter.Open(location);
|
filter.Open(location);
|
||||||
ImagePlugin image = new VDI();
|
ImagePlugin image = new VDI();
|
||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
PartPlugin parts = new DiscImageChef.PartPlugins.AtariPartitions();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Assert.AreEqual(wanted[i].Length, partitions.Count, testfiles[i]);
|
Assert.AreEqual(wanted[i].Length, partitions.Count, testfiles[i]);
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -77,8 +77,7 @@ namespace DiscImageChef.Tests.Partitions
|
|||||||
filter.Open(location);
|
filter.Open(location);
|
||||||
ImagePlugin image = new VDI();
|
ImagePlugin image = new VDI();
|
||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
PartPlugin parts = new DiscImageChef.PartPlugins.BSD();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Assert.AreEqual(wanted[i].Length, partitions.Count, testfiles[i]);
|
Assert.AreEqual(wanted[i].Length, partitions.Count, testfiles[i]);
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -91,8 +91,7 @@ namespace DiscImageChef.Tests.Partitions
|
|||||||
filter.Open(location);
|
filter.Open(location);
|
||||||
ImagePlugin image = new VDI();
|
ImagePlugin image = new VDI();
|
||||||
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]);
|
||||||
PartPlugin parts = new DiscImageChef.PartPlugins.GuidPartitionTable();
|
List<Partition> partitions = Core.Partitions.GetAll(image);
|
||||||
Assert.AreEqual(true, parts.GetInformation(image, out List<Partition> partitions), testfiles[i]);
|
|
||||||
Assert.AreEqual(wanted[i].Length, partitions.Count, testfiles[i]);
|
Assert.AreEqual(wanted[i].Length, partitions.Count, testfiles[i]);
|
||||||
for(int j = 0; j < partitions.Count; j++)
|
for(int j = 0; j < partitions.Count; j++)
|
||||||
{
|
{
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user