diff --git a/DiscImageChef.Tests/DiscImageChef.Tests.csproj b/DiscImageChef.Tests/DiscImageChef.Tests.csproj index 7b25a46ff..638a32be5 100644 --- a/DiscImageChef.Tests/DiscImageChef.Tests.csproj +++ b/DiscImageChef.Tests/DiscImageChef.Tests.csproj @@ -154,6 +154,15 @@ + + + + + + + + + @@ -163,6 +172,7 @@ + diff --git a/DiscImageChef.Tests/Partitions/Acorn.cs b/DiscImageChef.Tests/Partitions/Acorn.cs index 84b7fa84d..c1ab68b9e 100644 --- a/DiscImageChef.Tests/Partitions/Acorn.cs +++ b/DiscImageChef.Tests/Partitions/Acorn.cs @@ -48,14 +48,15 @@ using NUnit.Framework; namespace DiscImageChef.Tests.Partitions { [TestFixture] - public class Atari + public class Acorn { readonly string[] testfiles = { - "linux_ahdi.vdi.lz","linux_icd.vdi.lz","tos_1.04.vdi.lz", + "linux_ics.vdi.lz", }; readonly Partition[][] wanted = { - // Linux (AHDI) + // Linux (ICS) + // TODO: Values are incorrect new []{ new Partition{ PartitionDescription = null, PartitionLength = 31457280, PartitionName = null, PartitionType = "GEM", PartitionStart = 512, PartitionSectors = 61440, PartitionSequence = 0, PartitionStartSector = 1 }, @@ -65,50 +66,6 @@ namespace DiscImageChef.Tests.Partitions PartitionSequence = 2, PartitionStartSector = 143361 }, new Partition{ PartitionDescription = null, PartitionLength = 43212800, PartitionName = null, PartitionType = "MAC", PartitionStart = 129803264, PartitionSectors = 84400, PartitionSequence = 3, PartitionStartSector = 253522 }, - new Partition{ PartitionDescription = null, PartitionLength = 57671680, PartitionName = null, PartitionType = "MIX", PartitionStart = 173016064, PartitionSectors = 112640, - PartitionSequence = 4, PartitionStartSector = 337922 }, - new Partition{ PartitionDescription = null, PartitionLength = 62914560, PartitionName = null, PartitionType = "MNX", PartitionStart = 230687744, PartitionSectors = 122880, - PartitionSequence = 5, PartitionStartSector = 450562 }, - new Partition{ PartitionDescription = null, PartitionLength = 73400320, PartitionName = null, PartitionType = "RAW", PartitionStart = 293602304, PartitionSectors = 143360, - PartitionSequence = 6, PartitionStartSector = 573442 }, - new Partition{ PartitionDescription = null, PartitionLength = 78643200, PartitionName = null, PartitionType = "SWP", PartitionStart = 367002624, PartitionSectors = 153600, - PartitionSequence = 7, PartitionStartSector = 716802 }, - new Partition{ PartitionDescription = null, PartitionLength = 1048576, PartitionName = null, PartitionType = "UNX", PartitionStart = 445645824, PartitionSectors = 2048, - PartitionSequence = 8, PartitionStartSector = 870402 }, - new Partition{ PartitionDescription = null, PartitionLength = 77593600, PartitionName = null, PartitionType = "LNX", PartitionStart = 446694400, PartitionSectors = 151550, - PartitionSequence = 9, PartitionStartSector = 872450 }, - }, - // Linux (ICD) - new []{ - new Partition{ PartitionDescription = null, PartitionLength = 15728640, PartitionName = null, PartitionType = "GEM", PartitionStart = 512, PartitionSectors = 30720, - PartitionSequence = 0, PartitionStartSector = 1 }, - new Partition{ PartitionDescription = null, PartitionLength = 20971520, PartitionName = null, PartitionType = "UNX", PartitionStart = 15729152, PartitionSectors = 40960, - PartitionSequence = 1, PartitionStartSector = 30721 }, - new Partition{ PartitionDescription = null, PartitionLength = 31457280, PartitionName = null, PartitionType = "LNX", PartitionStart = 36700672, PartitionSectors = 61440, - PartitionSequence = 2, PartitionStartSector = 71681 }, - new Partition{ PartitionDescription = null, PartitionLength = 41943040, PartitionName = null, PartitionType = "BGM", PartitionStart = 68157952, PartitionSectors = 81920, - PartitionSequence = 3, PartitionStartSector = 133121 }, - new Partition{ PartitionDescription = null, PartitionLength = 52428800, PartitionName = null, PartitionType = "MAC", PartitionStart = 110100992, PartitionSectors = 102400, - PartitionSequence = 4, PartitionStartSector = 215041 }, - new Partition{ PartitionDescription = null, PartitionLength = 62914560, PartitionName = null, PartitionType = "MIX", PartitionStart = 162529792, PartitionSectors = 122880, - PartitionSequence = 5, PartitionStartSector = 317441 }, - new Partition{ PartitionDescription = null, PartitionLength = 83886080, PartitionName = null, PartitionType = "SWP", PartitionStart = 225444352, PartitionSectors = 163840, - PartitionSequence = 6, PartitionStartSector = 440321 }, - new Partition{ PartitionDescription = null, PartitionLength = 103809024, PartitionName = null, PartitionType = "MNX", PartitionStart = 309330432, PartitionSectors = 202752, - PartitionSequence = 7, PartitionStartSector = 604161 }, - new Partition{ PartitionDescription = null, PartitionLength = 104857600, PartitionName = null, PartitionType = "LNX", PartitionStart = 413139456, PartitionSectors = 204800, - PartitionSequence = 8, PartitionStartSector = 806913 }, - }, - // TOS 1.04 - new []{ - new Partition{ PartitionDescription = null, PartitionLength = 7340032, PartitionName = null, PartitionType = "GEM", PartitionStart = 1024, PartitionSectors = 14336, - PartitionSequence = 0, PartitionStartSector = 2 }, - new Partition{ PartitionDescription = null, PartitionLength = 7340032, PartitionName = null, PartitionType = "GEM", PartitionStart = 7341056, PartitionSectors = 14336, - PartitionSequence = 1, PartitionStartSector = 14338 }, - new Partition{ PartitionDescription = null, PartitionLength = 7340032, PartitionName = null, PartitionType = "GEM", PartitionStart = 14681088, PartitionSectors = 14336, - PartitionSequence = 2, PartitionStartSector = 28674 }, - new Partition{ PartitionDescription = null, PartitionLength = 7339008, PartitionName = null, PartitionType = "GEM", PartitionStart = 22021120, PartitionSectors = 14334, - PartitionSequence = 3, PartitionStartSector = 43010 }, }, }; @@ -117,12 +74,12 @@ namespace DiscImageChef.Tests.Partitions { for(int i = 0; i < testfiles.Length; i++) { - string location = Path.Combine(Consts.TestFilesRoot, "partitions", "atari", testfiles[i]); + string location = Path.Combine(Consts.TestFilesRoot, "partitions", "acorn", testfiles[i]); Filter filter = new LZip(); filter.Open(location); ImagePlugin image = new VDI(); Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]); - PartPlugin parts = new DiscImageChef.PartPlugins.AtariPartitions(); + PartPlugin parts = new DiscImageChef.PartPlugins.Acorn(); Assert.AreEqual(true, parts.GetInformation(image, out List partitions), testfiles[i]); Assert.AreEqual(wanted[i].Length, partitions.Count, testfiles[i]); for(int j = 0; j < partitions.Count; j++) diff --git a/DiscImageChef.Tests/Partitions/AppleMap.cs b/DiscImageChef.Tests/Partitions/AppleMap.cs index 741c0994a..b3f038e12 100644 --- a/DiscImageChef.Tests/Partitions/AppleMap.cs +++ b/DiscImageChef.Tests/Partitions/AppleMap.cs @@ -2,7 +2,7 @@ // The Disc Image Chef // ---------------------------------------------------------------------------- // -// Filename : HFS_APM.cs +// Filename : AppleMap.cs // Version : 1.0 // Author(s) : Natalia Portillo // @@ -45,134 +45,457 @@ using DiscImageChef.ImagePlugins; using DiscImageChef.PartPlugins; using NUnit.Framework; -namespace DiscImageChef.Tests.Filesystems +namespace DiscImageChef.Tests.Partitions { [TestFixture] - public class HFS_APM + public class AppleMap { readonly string[] testfiles = { - "amigaos_3.9.vdi.lz","darwin_1.3.1.vdi.lz","darwin_1.4.1.vdi.lz","darwin_6.0.2.vdi.lz", - "darwin_8.0.1.vdi.lz","macos_1.1.vdi.lz","macos_2.0.vdi.lz","macos_6.0.7.vdi.lz", - "macos_7.5.3.vdi.lz","macos_7.5.vdi.lz","macos_7.6.vdi.lz","macos_8.0.vdi.lz", - "macos_8.1.vdi.lz","macos_9.0.4.vdi.lz","macos_9.1.vdi.lz","macos_9.2.1.vdi.lz", - "macos_9.2.2.vdi.lz","macosx_10.2.vdi.lz","macosx_10.3.vdi.lz","macosx_10.4.vdi.lz", - "rhapsody_dr1.vdi.lz","d2_driver.vdi.lz","hdt_1.8.vdi.lz","macos_4.2.vdi.lz", - "macos_4.3.vdi.lz","macos_6.0.2.vdi.lz","macos_6.0.3.vdi.lz","macos_6.0.4.vdi.lz", - "macos_6.0.5.vdi.lz","macos_6.0.8.vdi.lz","macos_6.0.vdi.lz","macos_7.0.vdi.lz", - "macos_7.1.1.vdi.lz","parted.vdi.lz","silverlining_2.2.1.vdi.lz","speedtools_3.6.vdi.lz", - "vcpformatter_2.1.1.vdi.lz", + "d2_driver.vdi.lz","hdt_1.8_encrypted1.vdi.lz","hdt_1.8_encrypted2.vdi.lz","hdt_1.8_password.vdi.lz", + "hdt_1.8.vdi.lz","linux.vdi.lz","macos_1.1.vdi.lz","macos_2.0.vdi.lz", + "macos_4.2.vdi.lz","macos_4.3.vdi.lz","macos_6.0.2.vdi.lz","macos_6.0.3.vdi.lz", + "macos_6.0.4.vdi.lz","macos_6.0.5.vdi.lz","macos_6.0.7.vdi.lz","macos_6.0.8.vdi.lz", + "macos_6.0.vdi.lz","macos_7.0.vdi.lz","macos_7.1.1.vdi.lz","macos_7.5.vdi.lz", + "parted.vdi.lz","silverlining_2.2.1.vdi.lz","speedtools_3.6.vdi.lz","vcpformatter_2.1.1.vdi.lz", }; - readonly ulong[] sectors = { - 1024128,409600,409600,409600, - 409600,41820,41820,81648, - 1024000,1024000,1024000,1024000, - 1024000,1024000,1024000,1024000, - 1024000,1024000,1024000,1024000, - 409600,51200,51200,41820, - 41820,54840,54840,54840, - 54840,54840,41820,54840, - 54840,262144,51200,51200, - 54840, - }; - - readonly uint[] sectorsize = { - 512,512,512,512, - 512,512,512,512, - 512,512,512,512, - 512,512,512,512, - 512,512,512,512, - 512,512,512,512, - 512,512,512,512, - 512,512,512,512, - 512,512,512,512, - 512, - }; - - readonly long[] clusters = { - 64003,51189,51189,58502, - 58502,41788,38950,39991, - 63954,63990,63954,63954, - 63954,63922,63922,63922, - 63922,63884,63883,63883, - 58506,50926,50094,38950, - 38950,38950,38950,7673, - 38950,38950,38950,38950, - 38950,46071,50382,49135, - 54643, - }; - - readonly int[] clustersize = { - 8192,4096,4096,3584, - 3584,512,512,1024, - 8192,8192,8192,8192, - 8192,8192,8192,8192, - 8192,8192,8192,8192, - 3584,512,512,512, - 512,512,512,512, - 512,512,512,512, - 512,1024,512,512, - 512, - }; - - readonly string[] volumename = { - "Volume label","Volume label","Volume label","Volume label", - "Volume label","Volume label","Volume label","Volume label", - "Volume label","Volume label","Volume label","Volume label", - "Volume label","Volume label","Volume label","Volume label", - "Volume label","Volume label","Volume label","Volume label", - "Volume label","Volume label","Volume label","Volume label", - "Volume label","Volume label","Volume label","Test disk", - "Volume label","Volume label","Volume label","Volume label", - "Volume label","Untitled","Untitled #1","24 MB Disk", - "Volume label", - }; - - readonly string[] volumeserial = { - null,null,null,null, - "AAFE1382AF5AA898",null,null,null, - null,null,null,null, - null,null,null,null, - null,"5A7C38B0CAF279C4","FB49083EBD150509","632C0B1DB46FD188", - null,null,null,null, - null,null,null,null, - null,null,null,null, - null,null,null,null, - null, - }; + readonly Partition[][] wanted = { + // D2 + new []{ + new Partition{ PartitionDescription = null, PartitionLength = 1024, PartitionName = null, PartitionType = "Apple_Driver", PartitionStart = 32768, PartitionSectors = 2, + PartitionSequence = 0, PartitionStartSector = 64 }, + new Partition{ PartitionDescription = null, PartitionLength = 42496, PartitionName = "Macintosh", PartitionType = "Apple_Driver43", PartitionStart = 32768, PartitionSectors = 83, + PartitionSequence = 1, PartitionStartSector = 64 }, + new Partition{ PartitionDescription = null, PartitionLength = 55808, PartitionName = "Empty", PartitionType = "Apple_Free", PartitionStart = 75264, PartitionSectors = 109, + PartitionSequence = 2, PartitionStartSector = 147 }, + new Partition{ PartitionDescription = null, PartitionLength = 26083328, PartitionName = "Volume label", PartitionType = "Apple_HFS", PartitionStart = 131072, PartitionSectors = 50944, + PartitionSequence = 3, PartitionStartSector = 256 }, + }, + // HDT 1.8 Encryption Level 1 + new []{ + new Partition{ PartitionDescription = null, PartitionLength = 7168, PartitionName = null, PartitionType = "Apple_Driver", PartitionStart = 32768, PartitionSectors = 14, + PartitionSequence = 0, PartitionStartSector = 64 }, + new Partition{ PartitionDescription = null, PartitionLength = 524288, PartitionName = "FWB Disk Driver", PartitionType = "Apple_Driver43", PartitionStart = 32768, PartitionSectors = 1024, + PartitionSequence = 1, PartitionStartSector = 64 }, + new Partition{ PartitionDescription = null, PartitionLength = 25657344, PartitionName = "MacOS", PartitionType = "Apple_HFS", PartitionStart = 557056, PartitionSectors = 50112, + PartitionSequence = 2, PartitionStartSector = 1088 }, + }, + // HDT 1.8 Encryption Level 2 + new []{ + new Partition{ PartitionDescription = null, PartitionLength = 7168, PartitionName = null, PartitionType = "Apple_Driver", PartitionStart = 32768, PartitionSectors = 14, + PartitionSequence = 0, PartitionStartSector = 64 }, + new Partition{ PartitionDescription = null, PartitionLength = 524288, PartitionName = "FWB Disk Driver", PartitionType = "Apple_Driver43", PartitionStart = 32768, PartitionSectors = 1024, + PartitionSequence = 1, PartitionStartSector = 64 }, + new Partition{ PartitionDescription = null, PartitionLength = 25657344, PartitionName = "MacOS", PartitionType = "Apple_HFS", PartitionStart = 557056, PartitionSectors = 50112, + PartitionSequence = 2, PartitionStartSector = 1088 }, + }, + // HDT 1.8 with password + new []{ + new Partition{ PartitionDescription = null, PartitionLength = 7168, PartitionName = null, PartitionType = "Apple_Driver", PartitionStart = 32768, PartitionSectors = 14, + PartitionSequence = 0, PartitionStartSector = 64 }, + new Partition{ PartitionDescription = null, PartitionLength = 524288, PartitionName = "FWB Disk Driver", PartitionType = "Apple_Driver43", PartitionStart = 32768, PartitionSectors = 1024, + PartitionSequence = 1, PartitionStartSector = 64 }, + new Partition{ PartitionDescription = null, PartitionLength = 25657344, PartitionName = "MacOS", PartitionType = "Apple_HFS", PartitionStart = 557056, PartitionSectors = 50112, + PartitionSequence = 2, PartitionStartSector = 1088 }, + }, + // HDT 1.8 + new []{ + new Partition{ PartitionDescription = null, PartitionLength = 7168, PartitionName = null, PartitionType = "Apple_Driver", PartitionStart = 32768, PartitionSectors = 14, + PartitionSequence = 0, PartitionStartSector = 64 }, + new Partition{ PartitionDescription = null, PartitionLength = 524288, PartitionName = "FWB Disk Driver", PartitionType = "Apple_Driver43", PartitionStart = 32768, PartitionSectors = 1024, + PartitionSequence = 1, PartitionStartSector = 64 }, + new Partition{ PartitionDescription = null, PartitionLength = 25657344, PartitionName = "MacOS", PartitionType = "Apple_HFS", PartitionStart = 557056, PartitionSectors = 50112, + PartitionSequence = 2, PartitionStartSector = 1088 }, + }, + // Linux + new []{ + new Partition{ PartitionDescription = null, PartitionLength = 512, PartitionName = "Extra", PartitionType = "Apple_Free", PartitionStart = 32768, PartitionSectors = 1, + PartitionSequence = 0, PartitionStartSector = 64 }, + new Partition{ PartitionDescription = null, PartitionLength = 819200, PartitionName = "bootstrap", PartitionType = "Apple_Bootstrap", PartitionStart = 33280, PartitionSectors = 1600, + PartitionSequence = 1, PartitionStartSector = 65 }, + new Partition{ PartitionDescription = null, PartitionLength = 512, PartitionName = "Extra", PartitionType = "Apple_Free", PartitionStart = 852480, PartitionSectors = 1, + PartitionSequence = 2, PartitionStartSector = 1665 }, + new Partition{ PartitionDescription = null, PartitionLength = 52428800, PartitionName = "Linux", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 852992, PartitionSectors = 102400, + PartitionSequence = 3, PartitionStartSector = 1666 }, + new Partition{ PartitionDescription = null, PartitionLength = 20971520, PartitionName = "ProDOS", PartitionType = "Apple_PRODOS", PartitionStart = 53281792, PartitionSectors = 40960, + PartitionSequence = 4, PartitionStartSector = 104066 }, + new Partition{ PartitionDescription = null, PartitionLength = 52428800, PartitionName = "Macintosh", PartitionType = "Apple_HFS", PartitionStart = 74253312, PartitionSectors = 102400, + PartitionSequence = 5, PartitionStartSector = 145026 }, + new Partition{ PartitionDescription = null, PartitionLength = 7535616, PartitionName = "Extra", PartitionType = "Apple_Free", PartitionStart = 126682112, PartitionSectors = 14718, + PartitionSequence = 6, PartitionStartSector = 247426 }, + }, + // Mac OS 1.1 + new []{ + new Partition{ PartitionDescription = null, PartitionLength = 5120, PartitionName = null, PartitionType = "Apple_Driver", PartitionStart = 2048, PartitionSectors = 10, + PartitionSequence = 0, PartitionStartSector = 4 }, + new Partition{ PartitionDescription = null, PartitionLength = 21403648, PartitionName = "Macintosh", PartitionType = "Apple_HFS", PartitionStart = 8192, PartitionSectors = 41804, + PartitionSequence = 1, PartitionStartSector = 16 }, + }, + // Mac OS 2.0 + new []{ + new Partition{ PartitionDescription = null, PartitionLength = 5120, PartitionName = null, PartitionType = "Apple_Driver", PartitionStart = 2048, PartitionSectors = 10, + PartitionSequence = 0, PartitionStartSector = 4 }, + new Partition{ PartitionDescription = null, PartitionLength = 19950080, PartitionName = "Macintosh", PartitionType = "Apple_HFS", PartitionStart = 8192, PartitionSectors = 38965, + PartitionSequence = 1, PartitionStartSector = 16 }, + }, + // Mac OS 4.2 + new []{ + new Partition{ PartitionDescription = null, PartitionLength = 5632, PartitionName = null, PartitionType = "Apple_Driver", PartitionStart = 2048, PartitionSectors = 11, + PartitionSequence = 0, PartitionStartSector = 4 }, + new Partition{ PartitionDescription = null, PartitionLength = 19950080, PartitionName = "Macintosh", PartitionType = "Apple_HFS", PartitionStart = 8192, PartitionSectors = 38965, + PartitionSequence = 1, PartitionStartSector = 16 }, + }, + // Mac OS 4.3 + new []{ + new Partition{ PartitionDescription = null, PartitionLength = 5632, PartitionName = null, PartitionType = "Apple_Driver", PartitionStart = 2048, PartitionSectors = 11, + PartitionSequence = 0, PartitionStartSector = 4 }, + new Partition{ PartitionDescription = null, PartitionLength = 19950080, PartitionName = "Macintosh", PartitionType = "Apple_HFS", PartitionStart = 8192, PartitionSectors = 38965, + PartitionSequence = 1, PartitionStartSector = 16 }, + }, + // Mac OS 6.0.2 + new []{ + new Partition{ PartitionDescription = null, PartitionLength = 5120, PartitionName = null, PartitionType = "Apple_Driver", PartitionStart = 32768, PartitionSectors = 10, + PartitionSequence = 0, PartitionStartSector = 64 }, + new Partition{ PartitionDescription = null, PartitionLength = 16384, PartitionName = "Macintosh", PartitionType = "Apple_Driver", PartitionStart = 32768, PartitionSectors = 32, + PartitionSequence = 1, PartitionStartSector = 64 }, + new Partition{ PartitionDescription = null, PartitionLength = 3203072, PartitionName = "MacOS", PartitionType = "Apple_HFS", PartitionStart = 49152, PartitionSectors = 6256, + PartitionSequence = 2, PartitionStartSector = 96 }, + new Partition{ PartitionDescription = null, PartitionLength = 524288, PartitionName = "Scratch", PartitionType = "Apple_Scratch", PartitionStart = 3252224, PartitionSectors = 1024, + PartitionSequence = 3, PartitionStartSector = 6352 }, + new Partition{ PartitionDescription = null, PartitionLength = 1048576, PartitionName = "Eschatology 1", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 3776512, PartitionSectors = 2048, + PartitionSequence = 4, PartitionStartSector = 7376 }, + new Partition{ PartitionDescription = null, PartitionLength = 2191360, PartitionName = "A/UX Root", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 4825088, PartitionSectors = 4280, + PartitionSequence = 5, PartitionStartSector = 9424 }, + new Partition{ PartitionDescription = null, PartitionLength = 1217024, PartitionName = "Swap", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 7016448, PartitionSectors = 2377, + PartitionSequence = 6, PartitionStartSector = 13704 }, + new Partition{ PartitionDescription = null, PartitionLength = 1572864, PartitionName = "Eschatology 2", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 8233472, PartitionSectors = 3072, + PartitionSequence = 7, PartitionStartSector = 16081 }, + new Partition{ PartitionDescription = null, PartitionLength = 1310720, PartitionName = "Root file system", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 9806336, PartitionSectors = 2560, + PartitionSequence = 8, PartitionStartSector = 19153 }, + new Partition{ PartitionDescription = null, PartitionLength = 2550272, PartitionName = "Usr file system", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 11117056, PartitionSectors = 4981, + PartitionSequence = 9, PartitionStartSector = 21713 }, + new Partition{ PartitionDescription = null, PartitionLength = 2048000, PartitionName = "Random A/UX fs", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 13667328, PartitionSectors = 4000, + PartitionSequence = 10, PartitionStartSector = 26694 }, + new Partition{ PartitionDescription = null, PartitionLength = 1296384, PartitionName = "Random A/UX fs", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 15715328, PartitionSectors = 2532, + PartitionSequence = 11, PartitionStartSector = 30694 }, + new Partition{ PartitionDescription = null, PartitionLength = 1364992, PartitionName = "Usr file system", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 17011712, PartitionSectors = 2666, + PartitionSequence = 12, PartitionStartSector = 33226 }, + new Partition{ PartitionDescription = null, PartitionLength = 3986432, PartitionName = "Usr file system", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 18376704, PartitionSectors = 7786, + PartitionSequence = 13, PartitionStartSector = 35892 }, + new Partition{ PartitionDescription = null, PartitionLength = 5714944, PartitionName = "Extra", PartitionType = "Apple_Free", PartitionStart = 22363136, PartitionSectors = 11162, + PartitionSequence = 14, PartitionStartSector = 43678 }, + }, + // Mac OS 6.0.3 + new []{ + new Partition{ PartitionDescription = null, PartitionLength = 5120, PartitionName = null, PartitionType = "Apple_Driver", PartitionStart = 32768, PartitionSectors = 10, + PartitionSequence = 0, PartitionStartSector = 64 }, + new Partition{ PartitionDescription = null, PartitionLength = 16384, PartitionName = "Macintosh", PartitionType = "Apple_Driver", PartitionStart = 32768, PartitionSectors = 32, + PartitionSequence = 1, PartitionStartSector = 64 }, + new Partition{ PartitionDescription = null, PartitionLength = 5948928, PartitionName = "MacOS", PartitionType = "Apple_HFS", PartitionStart = 49152, PartitionSectors = 11619, + PartitionSequence = 2, PartitionStartSector = 96 }, + new Partition{ PartitionDescription = null, PartitionLength = 1029632, PartitionName = "Scratch", PartitionType = "Apple_Scratch", PartitionStart = 5998080, PartitionSectors = 2011, + PartitionSequence = 3, PartitionStartSector = 11715 }, + new Partition{ PartitionDescription = null, PartitionLength = 2455552, PartitionName = "Eschatology 1", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 7027712, PartitionSectors = 4796, + PartitionSequence = 4, PartitionStartSector = 13726 }, + new Partition{ PartitionDescription = null, PartitionLength = 3932160, PartitionName = "A/UX Root", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 9483264, PartitionSectors = 7680, + PartitionSequence = 5, PartitionStartSector = 18522 }, + new Partition{ PartitionDescription = null, PartitionLength = 4194304, PartitionName = "Swap", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 13415424, PartitionSectors = 8192, + PartitionSequence = 6, PartitionStartSector = 26202 }, + new Partition{ PartitionDescription = null, PartitionLength = 587776, PartitionName = "Eschatology 2", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 17609728, PartitionSectors = 1148, + PartitionSequence = 7, PartitionStartSector = 34394 }, + new Partition{ PartitionDescription = null, PartitionLength = 6537216, PartitionName = "Root file system", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 18197504, PartitionSectors = 12768, + PartitionSequence = 8, PartitionStartSector = 35542 }, + new Partition{ PartitionDescription = null, PartitionLength = 1766400, PartitionName = "Usr file system", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 24734720, PartitionSectors = 3450, + PartitionSequence = 9, PartitionStartSector = 48310 }, + new Partition{ PartitionDescription = null, PartitionLength = 1558528, PartitionName = "Random A/UX fs", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 26519552, PartitionSectors = 3044, + PartitionSequence = 10, PartitionStartSector = 51796 }, + new Partition{ PartitionDescription = null, PartitionLength = 18432, PartitionName = "Extra", PartitionType = "Apple_Free", PartitionStart = 26501120, PartitionSectors = 36, + PartitionSequence = 11, PartitionStartSector = 51760 }, + }, + // Mac OS 6.0.4 + new []{ + new Partition{ PartitionDescription = null, PartitionLength = 5120, PartitionName = null, PartitionType = "Apple_Driver", PartitionStart = 32768, PartitionSectors = 10, + PartitionSequence = 0, PartitionStartSector = 64 }, + new Partition{ PartitionDescription = null, PartitionLength = 16384, PartitionName = "Macintosh", PartitionType = "Apple_Driver", PartitionStart = 32768, PartitionSectors = 32, + PartitionSequence = 1, PartitionStartSector = 64 }, + new Partition{ PartitionDescription = null, PartitionLength = 3932160, PartitionName = "MacOS", PartitionType = "Apple_HFS", PartitionStart = 49152, PartitionSectors = 7680, + PartitionSequence = 2, PartitionStartSector = 96 }, + new Partition{ PartitionDescription = null, PartitionLength = 3197440, PartitionName = "Scratch", PartitionType = "Apple_Scratch", PartitionStart = 3981312, PartitionSectors = 6245, + PartitionSequence = 3, PartitionStartSector = 7776 }, + new Partition{ PartitionDescription = null, PartitionLength = 3197440, PartitionName = "Eschatology 1", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 7178752, PartitionSectors = 6245, + PartitionSequence = 4, PartitionStartSector = 14021 }, + new Partition{ PartitionDescription = null, PartitionLength = 2626560, PartitionName = "A/UX Root", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 10376192, PartitionSectors = 5130, + PartitionSequence = 5, PartitionStartSector = 20266 }, + new Partition{ PartitionDescription = null, PartitionLength = 1370112, PartitionName = "Swap", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 13002752, PartitionSectors = 2676, + PartitionSequence = 6, PartitionStartSector = 25396 }, + new Partition{ PartitionDescription = null, PartitionLength = 2944512, PartitionName = "Eschatology 2", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 14372864, PartitionSectors = 5751, + PartitionSequence = 7, PartitionStartSector = 28072 }, + new Partition{ PartitionDescription = null, PartitionLength = 2776576, PartitionName = "Root file system", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 17317376, PartitionSectors = 5423, + PartitionSequence = 8, PartitionStartSector = 33823 }, + new Partition{ PartitionDescription = null, PartitionLength = 2892800, PartitionName = "Usr file system", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 20093952, PartitionSectors = 5650, + PartitionSequence = 9, PartitionStartSector = 39246 }, + new Partition{ PartitionDescription = null, PartitionLength = 3433472, PartitionName = "Random A/UX fs", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 22986752, PartitionSectors = 6706, + PartitionSequence = 10, PartitionStartSector = 44896 }, + new Partition{ PartitionDescription = null, PartitionLength = 1657856, PartitionName = "Extra", PartitionType = "Apple_Free", PartitionStart = 26420224, PartitionSectors = 3238, + PartitionSequence = 11, PartitionStartSector = 51602 }, + }, + // Mac OS 6.0.5 + new []{ + new Partition{ PartitionDescription = null, PartitionLength = 5120, PartitionName = null, PartitionType = "Apple_Driver", PartitionStart = 32768, PartitionSectors = 10, + PartitionSequence = 0, PartitionStartSector = 64 }, + new Partition{ PartitionDescription = null, PartitionLength = 16384, PartitionName = "Macintosh", PartitionType = "Apple_Driver", PartitionStart = 32768, PartitionSectors = 32, + PartitionSequence = 1, PartitionStartSector = 64 }, + new Partition{ PartitionDescription = null, PartitionLength = 2097152, PartitionName = "MacOS", PartitionType = "Apple_HFS", PartitionStart = 49152, PartitionSectors = 4096, + PartitionSequence = 2, PartitionStartSector = 96 }, + new Partition{ PartitionDescription = null, PartitionLength = 342528, PartitionName = "Scratch", PartitionType = "Apple_Scratch", PartitionStart = 2146304, PartitionSectors = 669, + PartitionSequence = 3, PartitionStartSector = 4192 }, + new Partition{ PartitionDescription = null, PartitionLength = 1417216, PartitionName = "Eschatology 1", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 2488832, PartitionSectors = 2768, + PartitionSequence = 4, PartitionStartSector = 4861 }, + new Partition{ PartitionDescription = null, PartitionLength = 1830912, PartitionName = "A/UX Root", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 3906048, PartitionSectors = 3576, + PartitionSequence = 5, PartitionStartSector = 7629 }, + new Partition{ PartitionDescription = null, PartitionLength = 1448960, PartitionName = "Swap", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 5736960, PartitionSectors = 2830, + PartitionSequence = 6, PartitionStartSector = 11205 }, + new Partition{ PartitionDescription = null, PartitionLength = 2687488, PartitionName = "Root file system", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 7185920, PartitionSectors = 5249, + PartitionSequence = 7, PartitionStartSector = 14035 }, + new Partition{ PartitionDescription = null, PartitionLength = 2565632, PartitionName = "Usr file system", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 9873408, PartitionSectors = 5011, + PartitionSequence = 8, PartitionStartSector = 19284 }, + new Partition{ PartitionDescription = null, PartitionLength = 1954816, PartitionName = "Unreserved 1", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 12439040, PartitionSectors = 3818, + PartitionSequence = 9, PartitionStartSector = 24295 }, + new Partition{ PartitionDescription = null, PartitionLength = 3543040, PartitionName = "Unreserved 2", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 14393856, PartitionSectors = 6920, + PartitionSequence = 10, PartitionStartSector = 28113 }, + new Partition{ PartitionDescription = null, PartitionLength = 2565632, PartitionName = "Unreserved 3", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 17936896, PartitionSectors = 5011, + PartitionSequence = 11, PartitionStartSector = 35033 }, + new Partition{ PartitionDescription = null, PartitionLength = 2932224, PartitionName = "Unreserved 4", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 20502528, PartitionSectors = 5727, + PartitionSequence = 12, PartitionStartSector = 40044 }, + new Partition{ PartitionDescription = null, PartitionLength = 1221632, PartitionName = "Random A/UX fs", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 23434752, PartitionSectors = 2386, + PartitionSequence = 13, PartitionStartSector = 45771 }, + new Partition{ PartitionDescription = null, PartitionLength = 3421696, PartitionName = "Extra", PartitionType = "Apple_Free", PartitionStart = 24656384, PartitionSectors = 6683, + PartitionSequence = 14, PartitionStartSector = 48157 }, + }, + // Mac OS 6.0.7 + new []{ + new Partition{ PartitionDescription = null, PartitionLength = 5120, PartitionName = null, PartitionType = "Apple_Driver", PartitionStart = 32768, PartitionSectors = 10, + PartitionSequence = 0, PartitionStartSector = 64 }, + new Partition{ PartitionDescription = null, PartitionLength = 14013952, PartitionName = "MacOS", PartitionType = "Apple_HFS", PartitionStart = 49152, PartitionSectors = 27371, + PartitionSequence = 1, PartitionStartSector = 96 }, + new Partition{ PartitionDescription = null, PartitionLength = 16384, PartitionName = "Macintosh", PartitionType = "Apple_Driver", PartitionStart = 32768, PartitionSectors = 32, + PartitionSequence = 2, PartitionStartSector = 64 }, + new Partition{ PartitionDescription = null, PartitionLength = 1492992, PartitionName = "Eschatology 1", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 14063104, PartitionSectors = 2916, + PartitionSequence = 3, PartitionStartSector = 27467 }, + new Partition{ PartitionDescription = null, PartitionLength = 919040, PartitionName = "A/UX Root", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 15556096, PartitionSectors = 1795, + PartitionSequence = 4, PartitionStartSector = 30383 }, + new Partition{ PartitionDescription = null, PartitionLength = 1302016, PartitionName = "Swap", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 16475136, PartitionSectors = 2543, + PartitionSequence = 5, PartitionStartSector = 32178 }, + new Partition{ PartitionDescription = null, PartitionLength = 1796608, PartitionName = "Root file system", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 17777152, PartitionSectors = 3509, + PartitionSequence = 6, PartitionStartSector = 34721 }, + new Partition{ PartitionDescription = null, PartitionLength = 1943552, PartitionName = "Usr file system", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 19573760, PartitionSectors = 3796, + PartitionSequence = 7, PartitionStartSector = 38230 }, + new Partition{ PartitionDescription = null, PartitionLength = 2186752, PartitionName = "Random A/UX fs", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 21517312, PartitionSectors = 4271, + PartitionSequence = 8, PartitionStartSector = 42026 }, + new Partition{ PartitionDescription = null, PartitionLength = 524288, PartitionName = "Unreserved 1", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 23704064, PartitionSectors = 1024, + PartitionSequence = 9, PartitionStartSector = 46297 }, + new Partition{ PartitionDescription = null, PartitionLength = 655360, PartitionName = "Unreserved 2", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 24228352, PartitionSectors = 1280, + PartitionSequence = 10, PartitionStartSector = 47321 }, + new Partition{ PartitionDescription = null, PartitionLength = 798208, PartitionName = "Unreserved 3", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 24883712, PartitionSectors = 1559, + PartitionSequence = 11, PartitionStartSector = 48601 }, + new Partition{ PartitionDescription = null, PartitionLength = 2252800, PartitionName = "Unreserved 4", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 25825280, PartitionSectors = 4400, + PartitionSequence = 12, PartitionStartSector = 50440 }, + new Partition{ PartitionDescription = null, PartitionLength = 143360, PartitionName = "Extra", PartitionType = "Apple_Free", PartitionStart = 25681920, PartitionSectors = 280, + PartitionSequence = 13, PartitionStartSector = 50160 }, + }, + // Mac OS 6.0.8 + new []{ + new Partition{ PartitionDescription = null, PartitionLength = 5120, PartitionName = null, PartitionType = "Apple_Driver", PartitionStart = 32768, PartitionSectors = 10, + PartitionSequence = 0, PartitionStartSector = 64 }, + new Partition{ PartitionDescription = null, PartitionLength = 16384, PartitionName = "Macintosh", PartitionType = "Apple_Driver", PartitionStart = 32768, PartitionSectors = 32, + PartitionSequence = 1, PartitionStartSector = 64 }, + new Partition{ PartitionDescription = null, PartitionLength = 4575744, PartitionName = "MacOS", PartitionType = "Apple_HFS", PartitionStart = 49152, PartitionSectors = 8937, + PartitionSequence = 2, PartitionStartSector = 96 }, + new Partition{ PartitionDescription = null, PartitionLength = 1143808, PartitionName = "Scratch", PartitionType = "Apple_Scratch", PartitionStart = 4624896, PartitionSectors = 2234, + PartitionSequence = 3, PartitionStartSector = 9033 }, + new Partition{ PartitionDescription = null, PartitionLength = 3020800, PartitionName = "Eschatology 1", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 5768704, PartitionSectors = 5900, + PartitionSequence = 4, PartitionStartSector = 11267 }, + new Partition{ PartitionDescription = null, PartitionLength = 2091520, PartitionName = "A/UX Root", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 25986560, PartitionSectors = 4085, + PartitionSequence = 5, PartitionStartSector = 50755 }, + new Partition{ PartitionDescription = null, PartitionLength = 3693056, PartitionName = "Swap", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 22293504, PartitionSectors = 7213, + PartitionSequence = 6, PartitionStartSector = 43542 }, + new Partition{ PartitionDescription = null, PartitionLength = 2308096, PartitionName = "Root file system", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 19985408, PartitionSectors = 4508, + PartitionSequence = 7, PartitionStartSector = 39034 }, + new Partition{ PartitionDescription = null, PartitionLength = 2885120, PartitionName = "Usr file system", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 17100288, PartitionSectors = 5635, + PartitionSequence = 8, PartitionStartSector = 33399 }, + new Partition{ PartitionDescription = null, PartitionLength = 1615872, PartitionName = "Unreserved 1", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 8789504, PartitionSectors = 3156, + PartitionSequence = 9, PartitionStartSector = 17167 }, + new Partition{ PartitionDescription = null, PartitionLength = 1615872, PartitionName = "Unreserved 2", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 15484416, PartitionSectors = 3156, + PartitionSequence = 10, PartitionStartSector = 30243 }, + new Partition{ PartitionDescription = null, PartitionLength = 1384960, PartitionName = "Unreserved 3", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 10405376, PartitionSectors = 2705, + PartitionSequence = 11, PartitionStartSector = 20323 }, + new Partition{ PartitionDescription = null, PartitionLength = 952832, PartitionName = "Unreserved 4", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 11790336, PartitionSectors = 1861, + PartitionSequence = 12, PartitionStartSector = 23028 }, + new Partition{ PartitionDescription = null, PartitionLength = 1495040, PartitionName = "Random A/UX fs", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 13989376, PartitionSectors = 2920, + PartitionSequence = 13, PartitionStartSector = 27323 }, + new Partition{ PartitionDescription = null, PartitionLength = 1246208, PartitionName = "Extra", PartitionType = "Apple_Free", PartitionStart = 12743168, PartitionSectors = 2434, + PartitionSequence = 14, PartitionStartSector = 24889 }, + }, + // Mac OS 6.0 + new []{ + new Partition{ PartitionDescription = null, PartitionLength = 5120, PartitionName = null, PartitionType = "Apple_Driver", PartitionStart = 32768, PartitionSectors = 10, + PartitionSequence = 0, PartitionStartSector = 64 }, + new Partition{ PartitionDescription = null, PartitionLength = 16384, PartitionName = "Macintosh", PartitionType = "Apple_Driver", PartitionStart = 32768, PartitionSectors = 32, + PartitionSequence = 1, PartitionStartSector = 64 }, + new Partition{ PartitionDescription = null, PartitionLength = 2097152, PartitionName = "MacOS", PartitionType = "Apple_HFS", PartitionStart = 49152, PartitionSectors = 4096, + PartitionSequence = 2, PartitionStartSector = 96 }, + new Partition{ PartitionDescription = null, PartitionLength = 2097152, PartitionName = "Scratch", PartitionType = "Apple_Scratch", PartitionStart = 2146304, PartitionSectors = 4096, + PartitionSequence = 3, PartitionStartSector = 4192 }, + new Partition{ PartitionDescription = null, PartitionLength = 2097152, PartitionName = "Eschatology 1", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 4243456, PartitionSectors = 4096, + PartitionSequence = 4, PartitionStartSector = 8288 }, + new Partition{ PartitionDescription = null, PartitionLength = 2097152, PartitionName = "A/UX Root", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 6340608, PartitionSectors = 4096, + PartitionSequence = 5, PartitionStartSector = 12384 }, + new Partition{ PartitionDescription = null, PartitionLength = 1048576, PartitionName = "Swap", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 8437760, PartitionSectors = 2048, + PartitionSequence = 6, PartitionStartSector = 16480 }, + new Partition{ PartitionDescription = null, PartitionLength = 2097152, PartitionName = "Eschatology 2", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 9486336, PartitionSectors = 4096, + PartitionSequence = 7, PartitionStartSector = 18528 }, + new Partition{ PartitionDescription = null, PartitionLength = 2097152, PartitionName = "Root file system", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 11583488, PartitionSectors = 4096, + PartitionSequence = 8, PartitionStartSector = 22624 }, + new Partition{ PartitionDescription = null, PartitionLength = 2310144, PartitionName = "Usr file system", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 13680640, PartitionSectors = 4512, + PartitionSequence = 9, PartitionStartSector = 26720 }, + new Partition{ PartitionDescription = null, PartitionLength = 5416960, PartitionName = "Random A/UX fs", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 15990784, PartitionSectors = 10580, + PartitionSequence = 10, PartitionStartSector = 31232 }, + new Partition{ PartitionDescription = null, PartitionLength = 4096, PartitionName = "Extra", PartitionType = "Apple_Free", PartitionStart = 21407744, PartitionSectors = 8, + PartitionSequence = 11, PartitionStartSector = 41812 }, + }, + // Mac OS 7.0 + new []{ + new Partition{ PartitionDescription = null, PartitionLength = 5120, PartitionName = null, PartitionType = "Apple_Driver", PartitionStart = 32768, PartitionSectors = 10, + PartitionSequence = 0, PartitionStartSector = 64 }, + new Partition{ PartitionDescription = null, PartitionLength = 16384, PartitionName = "Macintosh", PartitionType = "Apple_Driver", PartitionStart = 32768, PartitionSectors = 32, + PartitionSequence = 1, PartitionStartSector = 64 }, + new Partition{ PartitionDescription = null, PartitionLength = 5262336, PartitionName = "MacOS", PartitionType = "Apple_HFS", PartitionStart = 15845888, PartitionSectors = 10278, + PartitionSequence = 2, PartitionStartSector = 30949 }, + new Partition{ PartitionDescription = null, PartitionLength = 3073024, PartitionName = "Scratch", PartitionType = "Apple_Scratch", PartitionStart = 49152, PartitionSectors = 6002, + PartitionSequence = 3, PartitionStartSector = 96 }, + new Partition{ PartitionDescription = null, PartitionLength = 1707520, PartitionName = "Eschatology 1", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 21108224, PartitionSectors = 3335, + PartitionSequence = 4, PartitionStartSector = 41227 }, + new Partition{ PartitionDescription = null, PartitionLength = 5262336, PartitionName = "Extra", PartitionType = "Apple_Free", PartitionStart = 22815744, PartitionSectors = 10278, + PartitionSequence = 5, PartitionStartSector = 44562 }, + new Partition{ PartitionDescription = null, PartitionLength = 2726400, PartitionName = "Root file system", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 3122176, PartitionSectors = 5325, + PartitionSequence = 6, PartitionStartSector = 6098 }, + new Partition{ PartitionDescription = null, PartitionLength = 3180544, PartitionName = "Extra", PartitionType = "Apple_Free", PartitionStart = 5848576, PartitionSectors = 6212, + PartitionSequence = 7, PartitionStartSector = 11423 }, + new Partition{ PartitionDescription = null, PartitionLength = 4203520, PartitionName = "Random A/UX fs", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 9029120, PartitionSectors = 8210, + PartitionSequence = 8, PartitionStartSector = 17635 }, + new Partition{ PartitionDescription = null, PartitionLength = 2613248, PartitionName = "Extra", PartitionType = "Apple_Free", PartitionStart = 13232640, PartitionSectors = 5104, + PartitionSequence = 9, PartitionStartSector = 25845 }, + }, + // Mac OS 7.1.1 + new []{ + new Partition{ PartitionDescription = null, PartitionLength = 8704, PartitionName = null, PartitionType = "Apple_Driver", PartitionStart = 32768, PartitionSectors = 17, + PartitionSequence = 0, PartitionStartSector = 64 }, + new Partition{ PartitionDescription = null, PartitionLength = 16384, PartitionName = "Macintosh", PartitionType = "Apple_Driver43", PartitionStart = 32768, PartitionSectors = 32, + PartitionSequence = 1, PartitionStartSector = 64 }, + new Partition{ PartitionDescription = null, PartitionLength = 5148160, PartitionName = "MacOS", PartitionType = "Apple_HFS", PartitionStart = 7294464, PartitionSectors = 10055, + PartitionSequence = 2, PartitionStartSector = 14247 }, + new Partition{ PartitionDescription = null, PartitionLength = 2097152, PartitionName = "ProDOS", PartitionType = "Apple_PRODOS", PartitionStart = 5197312, PartitionSectors = 4096, + PartitionSequence = 3, PartitionStartSector = 10151 }, + new Partition{ PartitionDescription = null, PartitionLength = 3996672, PartitionName = "A/UX Root", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 24081408, PartitionSectors = 7806, + PartitionSequence = 4, PartitionStartSector = 47034 }, + new Partition{ PartitionDescription = null, PartitionLength = 1486848, PartitionName = "Random A/UX fs", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 49152, PartitionSectors = 2904, + PartitionSequence = 5, PartitionStartSector = 96 }, + new Partition{ PartitionDescription = null, PartitionLength = 4406784, PartitionName = "Extra", PartitionType = "Apple_Free", PartitionStart = 12442624, PartitionSectors = 8607, + PartitionSequence = 6, PartitionStartSector = 24302 }, + new Partition{ PartitionDescription = null, PartitionLength = 2485760, PartitionName = "Random A/UX fs", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 16849408, PartitionSectors = 4855, + PartitionSequence = 7, PartitionStartSector = 32909 }, + new Partition{ PartitionDescription = null, PartitionLength = 4746240, PartitionName = "Extra", PartitionType = "Apple_Free", PartitionStart = 19335168, PartitionSectors = 9270, + PartitionSequence = 8, PartitionStartSector = 37764 }, + new Partition{ PartitionDescription = null, PartitionLength = 2097152, PartitionName = "ProDOS", PartitionType = "Apple_PRODOS", PartitionStart = 1536000, PartitionSectors = 4096, + PartitionSequence = 9, PartitionStartSector = 3000 }, + new Partition{ PartitionDescription = null, PartitionLength = 1564160, PartitionName = "Extra", PartitionType = "Apple_Free", PartitionStart = 3633152, PartitionSectors = 3055, + PartitionSequence = 10, PartitionStartSector = 7096 }, + }, + // Mac OS 7.5 + new []{ + new Partition{ PartitionDescription = null, PartitionLength = 9216, PartitionName = null, PartitionType = "Apple_Driver", PartitionStart = 32768, PartitionSectors = 18, + PartitionSequence = 0, PartitionStartSector = 64 }, + new Partition{ PartitionDescription = null, PartitionLength = 16384, PartitionName = "Macintosh", PartitionType = "Apple_Driver43", PartitionStart = 32768, PartitionSectors = 32, + PartitionSequence = 1, PartitionStartSector = 64 }, + new Partition{ PartitionDescription = null, PartitionLength = 28028928, PartitionName = "MacOS", PartitionType = "Apple_HFS", PartitionStart = 49152, PartitionSectors = 54744, + PartitionSequence = 2, PartitionStartSector = 96 }, + }, + // GNU Parted + new []{ + new Partition{ PartitionDescription = null, PartitionLength = 47185920, PartitionName = "untitled", PartitionType = "Apple_HFS", PartitionStart = 2097152, PartitionSectors = 92160, + PartitionSequence = 0, PartitionStartSector = 4096 }, + new Partition{ PartitionDescription = null, PartitionLength = 84934656, PartitionName = "untitled", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 49283072, PartitionSectors = 165888, + PartitionSequence = 1, PartitionStartSector = 96256 }, + new Partition{ PartitionDescription = null, PartitionLength = 2064384, PartitionName = "Extra", PartitionType = "Apple_Free", PartitionStart = 32768, PartitionSectors = 4032, + PartitionSequence = 2, PartitionStartSector = 64 }, + }, + // Silverlining 2.2.1 + new []{ + new Partition{ PartitionDescription = null, PartitionLength = 3072, PartitionName = null, PartitionType = "Apple_Driver", PartitionStart = 32768, PartitionSectors = 6, + PartitionSequence = 0, PartitionStartSector = 64 }, + new Partition{ PartitionDescription = null, PartitionLength = 25088, PartitionName = null, PartitionType = "Apple_Driver", PartitionStart = 98304, PartitionSectors = 49, + PartitionSequence = 1, PartitionStartSector = 192 }, + new Partition{ PartitionDescription = null, PartitionLength = 65536, PartitionName = "Macintosh_SL", PartitionType = "Apple_Driver43", PartitionStart = 32768, PartitionSectors = 128, + PartitionSequence = 2, PartitionStartSector = 64 }, + new Partition{ PartitionDescription = null, PartitionLength = 65536, PartitionName = "Macintosh_SL", PartitionType = "Apple_Driver_ATA", PartitionStart = 98304, PartitionSectors = 128, + PartitionSequence = 3, PartitionStartSector = 192 }, + new Partition{ PartitionDescription = null, PartitionLength = 25804800, PartitionName = "Untitled #1", PartitionType = "Apple_HFS", PartitionStart = 163840, PartitionSectors = 50400, + PartitionSequence = 4, PartitionStartSector = 320 }, + new Partition{ PartitionDescription = null, PartitionLength = 237568, PartitionName = "Extra", PartitionType = "Apple_Free", PartitionStart = 25968640, PartitionSectors = 464, + PartitionSequence = 5, PartitionStartSector = 50720 }, + }, + // Hard Disk Speed Tools 3.6 + new []{ + new Partition{ PartitionDescription = null, PartitionLength = 13824, PartitionName = null, PartitionType = "Apple_Driver", PartitionStart = 32768, PartitionSectors = 27, + PartitionSequence = 0, PartitionStartSector = 64 }, + new Partition{ PartitionDescription = null, PartitionLength = 51200, PartitionName = "Macintosh", PartitionType = "Apple_Driver43", PartitionStart = 32768, PartitionSectors = 100, + PartitionSequence = 1, PartitionStartSector = 64 }, + new Partition{ PartitionDescription = null, PartitionLength = 25165824, PartitionName = "untitled", PartitionType = "Apple_HFS", PartitionStart = 83968, PartitionSectors = 49152, + PartitionSequence = 2, PartitionStartSector = 164 }, + new Partition{ PartitionDescription = null, PartitionLength = 963584, PartitionName = "Extra", PartitionType = "Apple_Free", PartitionStart = 25249792, PartitionSectors = 1882, + PartitionSequence = 3, PartitionStartSector = 49316 }, + }, + // VCP Formatter 2.1.1 + new []{ + new Partition{ PartitionDescription = null, PartitionLength = 12288, PartitionName = null, PartitionType = "Apple_Driver", PartitionStart = 57344, PartitionSectors = 24, + PartitionSequence = 0, PartitionStartSector = 112 }, + new Partition{ PartitionDescription = null, PartitionLength = 16384, PartitionName = "Macintosh", PartitionType = "Apple_Driver", PartitionStart = 57344, PartitionSectors = 32, + PartitionSequence = 1, PartitionStartSector = 112 }, + new Partition{ PartitionDescription = null, PartitionLength = 16384, PartitionName = "Extra", PartitionType = "Apple_Free", PartitionStart = 73728, PartitionSectors = 32, + PartitionSequence = 2, PartitionStartSector = 144 }, + new Partition{ PartitionDescription = null, PartitionLength = 27986944, PartitionName = "MacOS", PartitionType = "Apple_HFS", PartitionStart = 90112, PartitionSectors = 54662, + PartitionSequence = 3, PartitionStartSector = 176 }, + // TODO: ADFS tries to read past this partition... + new Partition{ PartitionDescription = null, PartitionLength = 1024, PartitionName = "Extra", PartitionType = "Apple_Free", PartitionStart = 28077056, PartitionSectors = 2, + PartitionSequence = 4, PartitionStartSector = 54838 }, + }, + }; [Test] public void Test() { for(int i = 0; i < testfiles.Length; i++) { - string location = Path.Combine(Consts.TestFilesRoot, "filesystems", "hfs_apm", testfiles[i]); + string location = Path.Combine(Consts.TestFilesRoot, "partitions", "apm", testfiles[i]); Filter filter = new LZip(); filter.Open(location); ImagePlugin image = new VDI(); Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]); - Assert.AreEqual(sectors[i], image.ImageInfo.sectors, testfiles[i]); - Assert.AreEqual(sectorsize[i], image.ImageInfo.sectorSize, testfiles[i]); - PartPlugin parts = new AppleMap(); + PartPlugin parts = new DiscImageChef.PartPlugins.AppleMap(); Assert.AreEqual(true, parts.GetInformation(image, out List partitions), testfiles[i]); - Filesystem fs = new DiscImageChef.Filesystems.AppleHFS(); - int part = -1; + Assert.AreEqual(wanted[i].Length, partitions.Count, testfiles[i]); for(int j = 0; j < partitions.Count; j++) { - if(partitions[j].PartitionType == "Apple_HFS") - { - part = j; - break; - } + // Too chatty + //Assert.AreEqual(wanted[i][j].PartitionDescription, partitions[j].PartitionDescription, testfiles[i]); + Assert.AreEqual(wanted[i][j].PartitionLength, partitions[j].PartitionLength, testfiles[i]); + Assert.AreEqual(wanted[i][j].PartitionName, partitions[j].PartitionName, testfiles[i]); + Assert.AreEqual(wanted[i][j].PartitionType, partitions[j].PartitionType, testfiles[i]); + Assert.AreEqual(wanted[i][j].PartitionStart, partitions[j].PartitionStart, testfiles[i]); + Assert.AreEqual(wanted[i][j].PartitionSectors, partitions[j].PartitionSectors, testfiles[i]); + Assert.AreEqual(wanted[i][j].PartitionSequence, partitions[j].PartitionSequence, testfiles[i]); + Assert.AreEqual(wanted[i][j].PartitionStartSector, partitions[j].PartitionStartSector, testfiles[i]); } - Assert.AreNotEqual(-1, part, "Partition not found"); - Assert.AreEqual(true, fs.Identify(image, partitions[part].PartitionStartSector, partitions[part].PartitionStartSector + partitions[part].PartitionSectors - 1), testfiles[i]); - fs.GetInformation(image, partitions[part].PartitionStartSector, partitions[part].PartitionStartSector + partitions[part].PartitionSectors - 1, out string information); - Assert.AreEqual(clusters[i], fs.XmlFSType.Clusters, testfiles[i]); - Assert.AreEqual(clustersize[i], fs.XmlFSType.ClusterSize, testfiles[i]); - Assert.AreEqual("HFS", fs.XmlFSType.Type, testfiles[i]); - Assert.AreEqual(volumename[i], fs.XmlFSType.VolumeName, testfiles[i]); - Assert.AreEqual(volumeserial[i], fs.XmlFSType.VolumeSerial, testfiles[i]); } } } diff --git a/DiscImageChef.Tests/Partitions/Atari.cs b/DiscImageChef.Tests/Partitions/Atari.cs index b3f038e12..84b7fa84d 100644 --- a/DiscImageChef.Tests/Partitions/Atari.cs +++ b/DiscImageChef.Tests/Partitions/Atari.cs @@ -2,7 +2,7 @@ // The Disc Image Chef // ---------------------------------------------------------------------------- // -// Filename : AppleMap.cs +// Filename : Atari.cs // Version : 1.0 // Author(s) : Natalia Portillo // @@ -48,426 +48,67 @@ using NUnit.Framework; namespace DiscImageChef.Tests.Partitions { [TestFixture] - public class AppleMap + public class Atari { readonly string[] testfiles = { - "d2_driver.vdi.lz","hdt_1.8_encrypted1.vdi.lz","hdt_1.8_encrypted2.vdi.lz","hdt_1.8_password.vdi.lz", - "hdt_1.8.vdi.lz","linux.vdi.lz","macos_1.1.vdi.lz","macos_2.0.vdi.lz", - "macos_4.2.vdi.lz","macos_4.3.vdi.lz","macos_6.0.2.vdi.lz","macos_6.0.3.vdi.lz", - "macos_6.0.4.vdi.lz","macos_6.0.5.vdi.lz","macos_6.0.7.vdi.lz","macos_6.0.8.vdi.lz", - "macos_6.0.vdi.lz","macos_7.0.vdi.lz","macos_7.1.1.vdi.lz","macos_7.5.vdi.lz", - "parted.vdi.lz","silverlining_2.2.1.vdi.lz","speedtools_3.6.vdi.lz","vcpformatter_2.1.1.vdi.lz", + "linux_ahdi.vdi.lz","linux_icd.vdi.lz","tos_1.04.vdi.lz", }; readonly Partition[][] wanted = { - // D2 + // Linux (AHDI) new []{ - new Partition{ PartitionDescription = null, PartitionLength = 1024, PartitionName = null, PartitionType = "Apple_Driver", PartitionStart = 32768, PartitionSectors = 2, - PartitionSequence = 0, PartitionStartSector = 64 }, - new Partition{ PartitionDescription = null, PartitionLength = 42496, PartitionName = "Macintosh", PartitionType = "Apple_Driver43", PartitionStart = 32768, PartitionSectors = 83, - PartitionSequence = 1, PartitionStartSector = 64 }, - new Partition{ PartitionDescription = null, PartitionLength = 55808, PartitionName = "Empty", PartitionType = "Apple_Free", PartitionStart = 75264, PartitionSectors = 109, - PartitionSequence = 2, PartitionStartSector = 147 }, - new Partition{ PartitionDescription = null, PartitionLength = 26083328, PartitionName = "Volume label", PartitionType = "Apple_HFS", PartitionStart = 131072, PartitionSectors = 50944, - PartitionSequence = 3, PartitionStartSector = 256 }, + new Partition{ PartitionDescription = null, PartitionLength = 31457280, PartitionName = null, PartitionType = "GEM", PartitionStart = 512, PartitionSectors = 61440, + PartitionSequence = 0, PartitionStartSector = 1 }, + new Partition{ PartitionDescription = null, PartitionLength = 41943040, PartitionName = null, PartitionType = "BGM", PartitionStart = 31457792, PartitionSectors = 81920, + PartitionSequence = 1, PartitionStartSector = 61441 }, + new Partition{ PartitionDescription = null, PartitionLength = 56402432, PartitionName = null, PartitionType = "LNX", PartitionStart = 73400832, PartitionSectors = 110161, + PartitionSequence = 2, PartitionStartSector = 143361 }, + new Partition{ PartitionDescription = null, PartitionLength = 43212800, PartitionName = null, PartitionType = "MAC", PartitionStart = 129803264, PartitionSectors = 84400, + PartitionSequence = 3, PartitionStartSector = 253522 }, + new Partition{ PartitionDescription = null, PartitionLength = 57671680, PartitionName = null, PartitionType = "MIX", PartitionStart = 173016064, PartitionSectors = 112640, + PartitionSequence = 4, PartitionStartSector = 337922 }, + new Partition{ PartitionDescription = null, PartitionLength = 62914560, PartitionName = null, PartitionType = "MNX", PartitionStart = 230687744, PartitionSectors = 122880, + PartitionSequence = 5, PartitionStartSector = 450562 }, + new Partition{ PartitionDescription = null, PartitionLength = 73400320, PartitionName = null, PartitionType = "RAW", PartitionStart = 293602304, PartitionSectors = 143360, + PartitionSequence = 6, PartitionStartSector = 573442 }, + new Partition{ PartitionDescription = null, PartitionLength = 78643200, PartitionName = null, PartitionType = "SWP", PartitionStart = 367002624, PartitionSectors = 153600, + PartitionSequence = 7, PartitionStartSector = 716802 }, + new Partition{ PartitionDescription = null, PartitionLength = 1048576, PartitionName = null, PartitionType = "UNX", PartitionStart = 445645824, PartitionSectors = 2048, + PartitionSequence = 8, PartitionStartSector = 870402 }, + new Partition{ PartitionDescription = null, PartitionLength = 77593600, PartitionName = null, PartitionType = "LNX", PartitionStart = 446694400, PartitionSectors = 151550, + PartitionSequence = 9, PartitionStartSector = 872450 }, }, - // HDT 1.8 Encryption Level 1 + // Linux (ICD) new []{ - new Partition{ PartitionDescription = null, PartitionLength = 7168, PartitionName = null, PartitionType = "Apple_Driver", PartitionStart = 32768, PartitionSectors = 14, - PartitionSequence = 0, PartitionStartSector = 64 }, - new Partition{ PartitionDescription = null, PartitionLength = 524288, PartitionName = "FWB Disk Driver", PartitionType = "Apple_Driver43", PartitionStart = 32768, PartitionSectors = 1024, - PartitionSequence = 1, PartitionStartSector = 64 }, - new Partition{ PartitionDescription = null, PartitionLength = 25657344, PartitionName = "MacOS", PartitionType = "Apple_HFS", PartitionStart = 557056, PartitionSectors = 50112, - PartitionSequence = 2, PartitionStartSector = 1088 }, + new Partition{ PartitionDescription = null, PartitionLength = 15728640, PartitionName = null, PartitionType = "GEM", PartitionStart = 512, PartitionSectors = 30720, + PartitionSequence = 0, PartitionStartSector = 1 }, + new Partition{ PartitionDescription = null, PartitionLength = 20971520, PartitionName = null, PartitionType = "UNX", PartitionStart = 15729152, PartitionSectors = 40960, + PartitionSequence = 1, PartitionStartSector = 30721 }, + new Partition{ PartitionDescription = null, PartitionLength = 31457280, PartitionName = null, PartitionType = "LNX", PartitionStart = 36700672, PartitionSectors = 61440, + PartitionSequence = 2, PartitionStartSector = 71681 }, + new Partition{ PartitionDescription = null, PartitionLength = 41943040, PartitionName = null, PartitionType = "BGM", PartitionStart = 68157952, PartitionSectors = 81920, + PartitionSequence = 3, PartitionStartSector = 133121 }, + new Partition{ PartitionDescription = null, PartitionLength = 52428800, PartitionName = null, PartitionType = "MAC", PartitionStart = 110100992, PartitionSectors = 102400, + PartitionSequence = 4, PartitionStartSector = 215041 }, + new Partition{ PartitionDescription = null, PartitionLength = 62914560, PartitionName = null, PartitionType = "MIX", PartitionStart = 162529792, PartitionSectors = 122880, + PartitionSequence = 5, PartitionStartSector = 317441 }, + new Partition{ PartitionDescription = null, PartitionLength = 83886080, PartitionName = null, PartitionType = "SWP", PartitionStart = 225444352, PartitionSectors = 163840, + PartitionSequence = 6, PartitionStartSector = 440321 }, + new Partition{ PartitionDescription = null, PartitionLength = 103809024, PartitionName = null, PartitionType = "MNX", PartitionStart = 309330432, PartitionSectors = 202752, + PartitionSequence = 7, PartitionStartSector = 604161 }, + new Partition{ PartitionDescription = null, PartitionLength = 104857600, PartitionName = null, PartitionType = "LNX", PartitionStart = 413139456, PartitionSectors = 204800, + PartitionSequence = 8, PartitionStartSector = 806913 }, }, - // HDT 1.8 Encryption Level 2 + // TOS 1.04 new []{ - new Partition{ PartitionDescription = null, PartitionLength = 7168, PartitionName = null, PartitionType = "Apple_Driver", PartitionStart = 32768, PartitionSectors = 14, - PartitionSequence = 0, PartitionStartSector = 64 }, - new Partition{ PartitionDescription = null, PartitionLength = 524288, PartitionName = "FWB Disk Driver", PartitionType = "Apple_Driver43", PartitionStart = 32768, PartitionSectors = 1024, - PartitionSequence = 1, PartitionStartSector = 64 }, - new Partition{ PartitionDescription = null, PartitionLength = 25657344, PartitionName = "MacOS", PartitionType = "Apple_HFS", PartitionStart = 557056, PartitionSectors = 50112, - PartitionSequence = 2, PartitionStartSector = 1088 }, - }, - // HDT 1.8 with password - new []{ - new Partition{ PartitionDescription = null, PartitionLength = 7168, PartitionName = null, PartitionType = "Apple_Driver", PartitionStart = 32768, PartitionSectors = 14, - PartitionSequence = 0, PartitionStartSector = 64 }, - new Partition{ PartitionDescription = null, PartitionLength = 524288, PartitionName = "FWB Disk Driver", PartitionType = "Apple_Driver43", PartitionStart = 32768, PartitionSectors = 1024, - PartitionSequence = 1, PartitionStartSector = 64 }, - new Partition{ PartitionDescription = null, PartitionLength = 25657344, PartitionName = "MacOS", PartitionType = "Apple_HFS", PartitionStart = 557056, PartitionSectors = 50112, - PartitionSequence = 2, PartitionStartSector = 1088 }, - }, - // HDT 1.8 - new []{ - new Partition{ PartitionDescription = null, PartitionLength = 7168, PartitionName = null, PartitionType = "Apple_Driver", PartitionStart = 32768, PartitionSectors = 14, - PartitionSequence = 0, PartitionStartSector = 64 }, - new Partition{ PartitionDescription = null, PartitionLength = 524288, PartitionName = "FWB Disk Driver", PartitionType = "Apple_Driver43", PartitionStart = 32768, PartitionSectors = 1024, - PartitionSequence = 1, PartitionStartSector = 64 }, - new Partition{ PartitionDescription = null, PartitionLength = 25657344, PartitionName = "MacOS", PartitionType = "Apple_HFS", PartitionStart = 557056, PartitionSectors = 50112, - PartitionSequence = 2, PartitionStartSector = 1088 }, - }, - // Linux - new []{ - new Partition{ PartitionDescription = null, PartitionLength = 512, PartitionName = "Extra", PartitionType = "Apple_Free", PartitionStart = 32768, PartitionSectors = 1, - PartitionSequence = 0, PartitionStartSector = 64 }, - new Partition{ PartitionDescription = null, PartitionLength = 819200, PartitionName = "bootstrap", PartitionType = "Apple_Bootstrap", PartitionStart = 33280, PartitionSectors = 1600, - PartitionSequence = 1, PartitionStartSector = 65 }, - new Partition{ PartitionDescription = null, PartitionLength = 512, PartitionName = "Extra", PartitionType = "Apple_Free", PartitionStart = 852480, PartitionSectors = 1, - PartitionSequence = 2, PartitionStartSector = 1665 }, - new Partition{ PartitionDescription = null, PartitionLength = 52428800, PartitionName = "Linux", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 852992, PartitionSectors = 102400, - PartitionSequence = 3, PartitionStartSector = 1666 }, - new Partition{ PartitionDescription = null, PartitionLength = 20971520, PartitionName = "ProDOS", PartitionType = "Apple_PRODOS", PartitionStart = 53281792, PartitionSectors = 40960, - PartitionSequence = 4, PartitionStartSector = 104066 }, - new Partition{ PartitionDescription = null, PartitionLength = 52428800, PartitionName = "Macintosh", PartitionType = "Apple_HFS", PartitionStart = 74253312, PartitionSectors = 102400, - PartitionSequence = 5, PartitionStartSector = 145026 }, - new Partition{ PartitionDescription = null, PartitionLength = 7535616, PartitionName = "Extra", PartitionType = "Apple_Free", PartitionStart = 126682112, PartitionSectors = 14718, - PartitionSequence = 6, PartitionStartSector = 247426 }, - }, - // Mac OS 1.1 - new []{ - new Partition{ PartitionDescription = null, PartitionLength = 5120, PartitionName = null, PartitionType = "Apple_Driver", PartitionStart = 2048, PartitionSectors = 10, - PartitionSequence = 0, PartitionStartSector = 4 }, - new Partition{ PartitionDescription = null, PartitionLength = 21403648, PartitionName = "Macintosh", PartitionType = "Apple_HFS", PartitionStart = 8192, PartitionSectors = 41804, - PartitionSequence = 1, PartitionStartSector = 16 }, - }, - // Mac OS 2.0 - new []{ - new Partition{ PartitionDescription = null, PartitionLength = 5120, PartitionName = null, PartitionType = "Apple_Driver", PartitionStart = 2048, PartitionSectors = 10, - PartitionSequence = 0, PartitionStartSector = 4 }, - new Partition{ PartitionDescription = null, PartitionLength = 19950080, PartitionName = "Macintosh", PartitionType = "Apple_HFS", PartitionStart = 8192, PartitionSectors = 38965, - PartitionSequence = 1, PartitionStartSector = 16 }, - }, - // Mac OS 4.2 - new []{ - new Partition{ PartitionDescription = null, PartitionLength = 5632, PartitionName = null, PartitionType = "Apple_Driver", PartitionStart = 2048, PartitionSectors = 11, - PartitionSequence = 0, PartitionStartSector = 4 }, - new Partition{ PartitionDescription = null, PartitionLength = 19950080, PartitionName = "Macintosh", PartitionType = "Apple_HFS", PartitionStart = 8192, PartitionSectors = 38965, - PartitionSequence = 1, PartitionStartSector = 16 }, - }, - // Mac OS 4.3 - new []{ - new Partition{ PartitionDescription = null, PartitionLength = 5632, PartitionName = null, PartitionType = "Apple_Driver", PartitionStart = 2048, PartitionSectors = 11, - PartitionSequence = 0, PartitionStartSector = 4 }, - new Partition{ PartitionDescription = null, PartitionLength = 19950080, PartitionName = "Macintosh", PartitionType = "Apple_HFS", PartitionStart = 8192, PartitionSectors = 38965, - PartitionSequence = 1, PartitionStartSector = 16 }, - }, - // Mac OS 6.0.2 - new []{ - new Partition{ PartitionDescription = null, PartitionLength = 5120, PartitionName = null, PartitionType = "Apple_Driver", PartitionStart = 32768, PartitionSectors = 10, - PartitionSequence = 0, PartitionStartSector = 64 }, - new Partition{ PartitionDescription = null, PartitionLength = 16384, PartitionName = "Macintosh", PartitionType = "Apple_Driver", PartitionStart = 32768, PartitionSectors = 32, - PartitionSequence = 1, PartitionStartSector = 64 }, - new Partition{ PartitionDescription = null, PartitionLength = 3203072, PartitionName = "MacOS", PartitionType = "Apple_HFS", PartitionStart = 49152, PartitionSectors = 6256, - PartitionSequence = 2, PartitionStartSector = 96 }, - new Partition{ PartitionDescription = null, PartitionLength = 524288, PartitionName = "Scratch", PartitionType = "Apple_Scratch", PartitionStart = 3252224, PartitionSectors = 1024, - PartitionSequence = 3, PartitionStartSector = 6352 }, - new Partition{ PartitionDescription = null, PartitionLength = 1048576, PartitionName = "Eschatology 1", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 3776512, PartitionSectors = 2048, - PartitionSequence = 4, PartitionStartSector = 7376 }, - new Partition{ PartitionDescription = null, PartitionLength = 2191360, PartitionName = "A/UX Root", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 4825088, PartitionSectors = 4280, - PartitionSequence = 5, PartitionStartSector = 9424 }, - new Partition{ PartitionDescription = null, PartitionLength = 1217024, PartitionName = "Swap", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 7016448, PartitionSectors = 2377, - PartitionSequence = 6, PartitionStartSector = 13704 }, - new Partition{ PartitionDescription = null, PartitionLength = 1572864, PartitionName = "Eschatology 2", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 8233472, PartitionSectors = 3072, - PartitionSequence = 7, PartitionStartSector = 16081 }, - new Partition{ PartitionDescription = null, PartitionLength = 1310720, PartitionName = "Root file system", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 9806336, PartitionSectors = 2560, - PartitionSequence = 8, PartitionStartSector = 19153 }, - new Partition{ PartitionDescription = null, PartitionLength = 2550272, PartitionName = "Usr file system", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 11117056, PartitionSectors = 4981, - PartitionSequence = 9, PartitionStartSector = 21713 }, - new Partition{ PartitionDescription = null, PartitionLength = 2048000, PartitionName = "Random A/UX fs", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 13667328, PartitionSectors = 4000, - PartitionSequence = 10, PartitionStartSector = 26694 }, - new Partition{ PartitionDescription = null, PartitionLength = 1296384, PartitionName = "Random A/UX fs", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 15715328, PartitionSectors = 2532, - PartitionSequence = 11, PartitionStartSector = 30694 }, - new Partition{ PartitionDescription = null, PartitionLength = 1364992, PartitionName = "Usr file system", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 17011712, PartitionSectors = 2666, - PartitionSequence = 12, PartitionStartSector = 33226 }, - new Partition{ PartitionDescription = null, PartitionLength = 3986432, PartitionName = "Usr file system", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 18376704, PartitionSectors = 7786, - PartitionSequence = 13, PartitionStartSector = 35892 }, - new Partition{ PartitionDescription = null, PartitionLength = 5714944, PartitionName = "Extra", PartitionType = "Apple_Free", PartitionStart = 22363136, PartitionSectors = 11162, - PartitionSequence = 14, PartitionStartSector = 43678 }, - }, - // Mac OS 6.0.3 - new []{ - new Partition{ PartitionDescription = null, PartitionLength = 5120, PartitionName = null, PartitionType = "Apple_Driver", PartitionStart = 32768, PartitionSectors = 10, - PartitionSequence = 0, PartitionStartSector = 64 }, - new Partition{ PartitionDescription = null, PartitionLength = 16384, PartitionName = "Macintosh", PartitionType = "Apple_Driver", PartitionStart = 32768, PartitionSectors = 32, - PartitionSequence = 1, PartitionStartSector = 64 }, - new Partition{ PartitionDescription = null, PartitionLength = 5948928, PartitionName = "MacOS", PartitionType = "Apple_HFS", PartitionStart = 49152, PartitionSectors = 11619, - PartitionSequence = 2, PartitionStartSector = 96 }, - new Partition{ PartitionDescription = null, PartitionLength = 1029632, PartitionName = "Scratch", PartitionType = "Apple_Scratch", PartitionStart = 5998080, PartitionSectors = 2011, - PartitionSequence = 3, PartitionStartSector = 11715 }, - new Partition{ PartitionDescription = null, PartitionLength = 2455552, PartitionName = "Eschatology 1", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 7027712, PartitionSectors = 4796, - PartitionSequence = 4, PartitionStartSector = 13726 }, - new Partition{ PartitionDescription = null, PartitionLength = 3932160, PartitionName = "A/UX Root", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 9483264, PartitionSectors = 7680, - PartitionSequence = 5, PartitionStartSector = 18522 }, - new Partition{ PartitionDescription = null, PartitionLength = 4194304, PartitionName = "Swap", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 13415424, PartitionSectors = 8192, - PartitionSequence = 6, PartitionStartSector = 26202 }, - new Partition{ PartitionDescription = null, PartitionLength = 587776, PartitionName = "Eschatology 2", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 17609728, PartitionSectors = 1148, - PartitionSequence = 7, PartitionStartSector = 34394 }, - new Partition{ PartitionDescription = null, PartitionLength = 6537216, PartitionName = "Root file system", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 18197504, PartitionSectors = 12768, - PartitionSequence = 8, PartitionStartSector = 35542 }, - new Partition{ PartitionDescription = null, PartitionLength = 1766400, PartitionName = "Usr file system", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 24734720, PartitionSectors = 3450, - PartitionSequence = 9, PartitionStartSector = 48310 }, - new Partition{ PartitionDescription = null, PartitionLength = 1558528, PartitionName = "Random A/UX fs", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 26519552, PartitionSectors = 3044, - PartitionSequence = 10, PartitionStartSector = 51796 }, - new Partition{ PartitionDescription = null, PartitionLength = 18432, PartitionName = "Extra", PartitionType = "Apple_Free", PartitionStart = 26501120, PartitionSectors = 36, - PartitionSequence = 11, PartitionStartSector = 51760 }, - }, - // Mac OS 6.0.4 - new []{ - new Partition{ PartitionDescription = null, PartitionLength = 5120, PartitionName = null, PartitionType = "Apple_Driver", PartitionStart = 32768, PartitionSectors = 10, - PartitionSequence = 0, PartitionStartSector = 64 }, - new Partition{ PartitionDescription = null, PartitionLength = 16384, PartitionName = "Macintosh", PartitionType = "Apple_Driver", PartitionStart = 32768, PartitionSectors = 32, - PartitionSequence = 1, PartitionStartSector = 64 }, - new Partition{ PartitionDescription = null, PartitionLength = 3932160, PartitionName = "MacOS", PartitionType = "Apple_HFS", PartitionStart = 49152, PartitionSectors = 7680, - PartitionSequence = 2, PartitionStartSector = 96 }, - new Partition{ PartitionDescription = null, PartitionLength = 3197440, PartitionName = "Scratch", PartitionType = "Apple_Scratch", PartitionStart = 3981312, PartitionSectors = 6245, - PartitionSequence = 3, PartitionStartSector = 7776 }, - new Partition{ PartitionDescription = null, PartitionLength = 3197440, PartitionName = "Eschatology 1", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 7178752, PartitionSectors = 6245, - PartitionSequence = 4, PartitionStartSector = 14021 }, - new Partition{ PartitionDescription = null, PartitionLength = 2626560, PartitionName = "A/UX Root", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 10376192, PartitionSectors = 5130, - PartitionSequence = 5, PartitionStartSector = 20266 }, - new Partition{ PartitionDescription = null, PartitionLength = 1370112, PartitionName = "Swap", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 13002752, PartitionSectors = 2676, - PartitionSequence = 6, PartitionStartSector = 25396 }, - new Partition{ PartitionDescription = null, PartitionLength = 2944512, PartitionName = "Eschatology 2", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 14372864, PartitionSectors = 5751, - PartitionSequence = 7, PartitionStartSector = 28072 }, - new Partition{ PartitionDescription = null, PartitionLength = 2776576, PartitionName = "Root file system", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 17317376, PartitionSectors = 5423, - PartitionSequence = 8, PartitionStartSector = 33823 }, - new Partition{ PartitionDescription = null, PartitionLength = 2892800, PartitionName = "Usr file system", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 20093952, PartitionSectors = 5650, - PartitionSequence = 9, PartitionStartSector = 39246 }, - new Partition{ PartitionDescription = null, PartitionLength = 3433472, PartitionName = "Random A/UX fs", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 22986752, PartitionSectors = 6706, - PartitionSequence = 10, PartitionStartSector = 44896 }, - new Partition{ PartitionDescription = null, PartitionLength = 1657856, PartitionName = "Extra", PartitionType = "Apple_Free", PartitionStart = 26420224, PartitionSectors = 3238, - PartitionSequence = 11, PartitionStartSector = 51602 }, - }, - // Mac OS 6.0.5 - new []{ - new Partition{ PartitionDescription = null, PartitionLength = 5120, PartitionName = null, PartitionType = "Apple_Driver", PartitionStart = 32768, PartitionSectors = 10, - PartitionSequence = 0, PartitionStartSector = 64 }, - new Partition{ PartitionDescription = null, PartitionLength = 16384, PartitionName = "Macintosh", PartitionType = "Apple_Driver", PartitionStart = 32768, PartitionSectors = 32, - PartitionSequence = 1, PartitionStartSector = 64 }, - new Partition{ PartitionDescription = null, PartitionLength = 2097152, PartitionName = "MacOS", PartitionType = "Apple_HFS", PartitionStart = 49152, PartitionSectors = 4096, - PartitionSequence = 2, PartitionStartSector = 96 }, - new Partition{ PartitionDescription = null, PartitionLength = 342528, PartitionName = "Scratch", PartitionType = "Apple_Scratch", PartitionStart = 2146304, PartitionSectors = 669, - PartitionSequence = 3, PartitionStartSector = 4192 }, - new Partition{ PartitionDescription = null, PartitionLength = 1417216, PartitionName = "Eschatology 1", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 2488832, PartitionSectors = 2768, - PartitionSequence = 4, PartitionStartSector = 4861 }, - new Partition{ PartitionDescription = null, PartitionLength = 1830912, PartitionName = "A/UX Root", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 3906048, PartitionSectors = 3576, - PartitionSequence = 5, PartitionStartSector = 7629 }, - new Partition{ PartitionDescription = null, PartitionLength = 1448960, PartitionName = "Swap", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 5736960, PartitionSectors = 2830, - PartitionSequence = 6, PartitionStartSector = 11205 }, - new Partition{ PartitionDescription = null, PartitionLength = 2687488, PartitionName = "Root file system", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 7185920, PartitionSectors = 5249, - PartitionSequence = 7, PartitionStartSector = 14035 }, - new Partition{ PartitionDescription = null, PartitionLength = 2565632, PartitionName = "Usr file system", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 9873408, PartitionSectors = 5011, - PartitionSequence = 8, PartitionStartSector = 19284 }, - new Partition{ PartitionDescription = null, PartitionLength = 1954816, PartitionName = "Unreserved 1", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 12439040, PartitionSectors = 3818, - PartitionSequence = 9, PartitionStartSector = 24295 }, - new Partition{ PartitionDescription = null, PartitionLength = 3543040, PartitionName = "Unreserved 2", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 14393856, PartitionSectors = 6920, - PartitionSequence = 10, PartitionStartSector = 28113 }, - new Partition{ PartitionDescription = null, PartitionLength = 2565632, PartitionName = "Unreserved 3", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 17936896, PartitionSectors = 5011, - PartitionSequence = 11, PartitionStartSector = 35033 }, - new Partition{ PartitionDescription = null, PartitionLength = 2932224, PartitionName = "Unreserved 4", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 20502528, PartitionSectors = 5727, - PartitionSequence = 12, PartitionStartSector = 40044 }, - new Partition{ PartitionDescription = null, PartitionLength = 1221632, PartitionName = "Random A/UX fs", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 23434752, PartitionSectors = 2386, - PartitionSequence = 13, PartitionStartSector = 45771 }, - new Partition{ PartitionDescription = null, PartitionLength = 3421696, PartitionName = "Extra", PartitionType = "Apple_Free", PartitionStart = 24656384, PartitionSectors = 6683, - PartitionSequence = 14, PartitionStartSector = 48157 }, - }, - // Mac OS 6.0.7 - new []{ - new Partition{ PartitionDescription = null, PartitionLength = 5120, PartitionName = null, PartitionType = "Apple_Driver", PartitionStart = 32768, PartitionSectors = 10, - PartitionSequence = 0, PartitionStartSector = 64 }, - new Partition{ PartitionDescription = null, PartitionLength = 14013952, PartitionName = "MacOS", PartitionType = "Apple_HFS", PartitionStart = 49152, PartitionSectors = 27371, - PartitionSequence = 1, PartitionStartSector = 96 }, - new Partition{ PartitionDescription = null, PartitionLength = 16384, PartitionName = "Macintosh", PartitionType = "Apple_Driver", PartitionStart = 32768, PartitionSectors = 32, - PartitionSequence = 2, PartitionStartSector = 64 }, - new Partition{ PartitionDescription = null, PartitionLength = 1492992, PartitionName = "Eschatology 1", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 14063104, PartitionSectors = 2916, - PartitionSequence = 3, PartitionStartSector = 27467 }, - new Partition{ PartitionDescription = null, PartitionLength = 919040, PartitionName = "A/UX Root", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 15556096, PartitionSectors = 1795, - PartitionSequence = 4, PartitionStartSector = 30383 }, - new Partition{ PartitionDescription = null, PartitionLength = 1302016, PartitionName = "Swap", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 16475136, PartitionSectors = 2543, - PartitionSequence = 5, PartitionStartSector = 32178 }, - new Partition{ PartitionDescription = null, PartitionLength = 1796608, PartitionName = "Root file system", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 17777152, PartitionSectors = 3509, - PartitionSequence = 6, PartitionStartSector = 34721 }, - new Partition{ PartitionDescription = null, PartitionLength = 1943552, PartitionName = "Usr file system", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 19573760, PartitionSectors = 3796, - PartitionSequence = 7, PartitionStartSector = 38230 }, - new Partition{ PartitionDescription = null, PartitionLength = 2186752, PartitionName = "Random A/UX fs", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 21517312, PartitionSectors = 4271, - PartitionSequence = 8, PartitionStartSector = 42026 }, - new Partition{ PartitionDescription = null, PartitionLength = 524288, PartitionName = "Unreserved 1", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 23704064, PartitionSectors = 1024, - PartitionSequence = 9, PartitionStartSector = 46297 }, - new Partition{ PartitionDescription = null, PartitionLength = 655360, PartitionName = "Unreserved 2", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 24228352, PartitionSectors = 1280, - PartitionSequence = 10, PartitionStartSector = 47321 }, - new Partition{ PartitionDescription = null, PartitionLength = 798208, PartitionName = "Unreserved 3", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 24883712, PartitionSectors = 1559, - PartitionSequence = 11, PartitionStartSector = 48601 }, - new Partition{ PartitionDescription = null, PartitionLength = 2252800, PartitionName = "Unreserved 4", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 25825280, PartitionSectors = 4400, - PartitionSequence = 12, PartitionStartSector = 50440 }, - new Partition{ PartitionDescription = null, PartitionLength = 143360, PartitionName = "Extra", PartitionType = "Apple_Free", PartitionStart = 25681920, PartitionSectors = 280, - PartitionSequence = 13, PartitionStartSector = 50160 }, - }, - // Mac OS 6.0.8 - new []{ - new Partition{ PartitionDescription = null, PartitionLength = 5120, PartitionName = null, PartitionType = "Apple_Driver", PartitionStart = 32768, PartitionSectors = 10, - PartitionSequence = 0, PartitionStartSector = 64 }, - new Partition{ PartitionDescription = null, PartitionLength = 16384, PartitionName = "Macintosh", PartitionType = "Apple_Driver", PartitionStart = 32768, PartitionSectors = 32, - PartitionSequence = 1, PartitionStartSector = 64 }, - new Partition{ PartitionDescription = null, PartitionLength = 4575744, PartitionName = "MacOS", PartitionType = "Apple_HFS", PartitionStart = 49152, PartitionSectors = 8937, - PartitionSequence = 2, PartitionStartSector = 96 }, - new Partition{ PartitionDescription = null, PartitionLength = 1143808, PartitionName = "Scratch", PartitionType = "Apple_Scratch", PartitionStart = 4624896, PartitionSectors = 2234, - PartitionSequence = 3, PartitionStartSector = 9033 }, - new Partition{ PartitionDescription = null, PartitionLength = 3020800, PartitionName = "Eschatology 1", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 5768704, PartitionSectors = 5900, - PartitionSequence = 4, PartitionStartSector = 11267 }, - new Partition{ PartitionDescription = null, PartitionLength = 2091520, PartitionName = "A/UX Root", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 25986560, PartitionSectors = 4085, - PartitionSequence = 5, PartitionStartSector = 50755 }, - new Partition{ PartitionDescription = null, PartitionLength = 3693056, PartitionName = "Swap", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 22293504, PartitionSectors = 7213, - PartitionSequence = 6, PartitionStartSector = 43542 }, - new Partition{ PartitionDescription = null, PartitionLength = 2308096, PartitionName = "Root file system", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 19985408, PartitionSectors = 4508, - PartitionSequence = 7, PartitionStartSector = 39034 }, - new Partition{ PartitionDescription = null, PartitionLength = 2885120, PartitionName = "Usr file system", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 17100288, PartitionSectors = 5635, - PartitionSequence = 8, PartitionStartSector = 33399 }, - new Partition{ PartitionDescription = null, PartitionLength = 1615872, PartitionName = "Unreserved 1", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 8789504, PartitionSectors = 3156, - PartitionSequence = 9, PartitionStartSector = 17167 }, - new Partition{ PartitionDescription = null, PartitionLength = 1615872, PartitionName = "Unreserved 2", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 15484416, PartitionSectors = 3156, - PartitionSequence = 10, PartitionStartSector = 30243 }, - new Partition{ PartitionDescription = null, PartitionLength = 1384960, PartitionName = "Unreserved 3", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 10405376, PartitionSectors = 2705, - PartitionSequence = 11, PartitionStartSector = 20323 }, - new Partition{ PartitionDescription = null, PartitionLength = 952832, PartitionName = "Unreserved 4", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 11790336, PartitionSectors = 1861, - PartitionSequence = 12, PartitionStartSector = 23028 }, - new Partition{ PartitionDescription = null, PartitionLength = 1495040, PartitionName = "Random A/UX fs", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 13989376, PartitionSectors = 2920, - PartitionSequence = 13, PartitionStartSector = 27323 }, - new Partition{ PartitionDescription = null, PartitionLength = 1246208, PartitionName = "Extra", PartitionType = "Apple_Free", PartitionStart = 12743168, PartitionSectors = 2434, - PartitionSequence = 14, PartitionStartSector = 24889 }, - }, - // Mac OS 6.0 - new []{ - new Partition{ PartitionDescription = null, PartitionLength = 5120, PartitionName = null, PartitionType = "Apple_Driver", PartitionStart = 32768, PartitionSectors = 10, - PartitionSequence = 0, PartitionStartSector = 64 }, - new Partition{ PartitionDescription = null, PartitionLength = 16384, PartitionName = "Macintosh", PartitionType = "Apple_Driver", PartitionStart = 32768, PartitionSectors = 32, - PartitionSequence = 1, PartitionStartSector = 64 }, - new Partition{ PartitionDescription = null, PartitionLength = 2097152, PartitionName = "MacOS", PartitionType = "Apple_HFS", PartitionStart = 49152, PartitionSectors = 4096, - PartitionSequence = 2, PartitionStartSector = 96 }, - new Partition{ PartitionDescription = null, PartitionLength = 2097152, PartitionName = "Scratch", PartitionType = "Apple_Scratch", PartitionStart = 2146304, PartitionSectors = 4096, - PartitionSequence = 3, PartitionStartSector = 4192 }, - new Partition{ PartitionDescription = null, PartitionLength = 2097152, PartitionName = "Eschatology 1", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 4243456, PartitionSectors = 4096, - PartitionSequence = 4, PartitionStartSector = 8288 }, - new Partition{ PartitionDescription = null, PartitionLength = 2097152, PartitionName = "A/UX Root", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 6340608, PartitionSectors = 4096, - PartitionSequence = 5, PartitionStartSector = 12384 }, - new Partition{ PartitionDescription = null, PartitionLength = 1048576, PartitionName = "Swap", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 8437760, PartitionSectors = 2048, - PartitionSequence = 6, PartitionStartSector = 16480 }, - new Partition{ PartitionDescription = null, PartitionLength = 2097152, PartitionName = "Eschatology 2", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 9486336, PartitionSectors = 4096, - PartitionSequence = 7, PartitionStartSector = 18528 }, - new Partition{ PartitionDescription = null, PartitionLength = 2097152, PartitionName = "Root file system", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 11583488, PartitionSectors = 4096, - PartitionSequence = 8, PartitionStartSector = 22624 }, - new Partition{ PartitionDescription = null, PartitionLength = 2310144, PartitionName = "Usr file system", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 13680640, PartitionSectors = 4512, - PartitionSequence = 9, PartitionStartSector = 26720 }, - new Partition{ PartitionDescription = null, PartitionLength = 5416960, PartitionName = "Random A/UX fs", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 15990784, PartitionSectors = 10580, - PartitionSequence = 10, PartitionStartSector = 31232 }, - new Partition{ PartitionDescription = null, PartitionLength = 4096, PartitionName = "Extra", PartitionType = "Apple_Free", PartitionStart = 21407744, PartitionSectors = 8, - PartitionSequence = 11, PartitionStartSector = 41812 }, - }, - // Mac OS 7.0 - new []{ - new Partition{ PartitionDescription = null, PartitionLength = 5120, PartitionName = null, PartitionType = "Apple_Driver", PartitionStart = 32768, PartitionSectors = 10, - PartitionSequence = 0, PartitionStartSector = 64 }, - new Partition{ PartitionDescription = null, PartitionLength = 16384, PartitionName = "Macintosh", PartitionType = "Apple_Driver", PartitionStart = 32768, PartitionSectors = 32, - PartitionSequence = 1, PartitionStartSector = 64 }, - new Partition{ PartitionDescription = null, PartitionLength = 5262336, PartitionName = "MacOS", PartitionType = "Apple_HFS", PartitionStart = 15845888, PartitionSectors = 10278, - PartitionSequence = 2, PartitionStartSector = 30949 }, - new Partition{ PartitionDescription = null, PartitionLength = 3073024, PartitionName = "Scratch", PartitionType = "Apple_Scratch", PartitionStart = 49152, PartitionSectors = 6002, - PartitionSequence = 3, PartitionStartSector = 96 }, - new Partition{ PartitionDescription = null, PartitionLength = 1707520, PartitionName = "Eschatology 1", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 21108224, PartitionSectors = 3335, - PartitionSequence = 4, PartitionStartSector = 41227 }, - new Partition{ PartitionDescription = null, PartitionLength = 5262336, PartitionName = "Extra", PartitionType = "Apple_Free", PartitionStart = 22815744, PartitionSectors = 10278, - PartitionSequence = 5, PartitionStartSector = 44562 }, - new Partition{ PartitionDescription = null, PartitionLength = 2726400, PartitionName = "Root file system", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 3122176, PartitionSectors = 5325, - PartitionSequence = 6, PartitionStartSector = 6098 }, - new Partition{ PartitionDescription = null, PartitionLength = 3180544, PartitionName = "Extra", PartitionType = "Apple_Free", PartitionStart = 5848576, PartitionSectors = 6212, - PartitionSequence = 7, PartitionStartSector = 11423 }, - new Partition{ PartitionDescription = null, PartitionLength = 4203520, PartitionName = "Random A/UX fs", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 9029120, PartitionSectors = 8210, - PartitionSequence = 8, PartitionStartSector = 17635 }, - new Partition{ PartitionDescription = null, PartitionLength = 2613248, PartitionName = "Extra", PartitionType = "Apple_Free", PartitionStart = 13232640, PartitionSectors = 5104, - PartitionSequence = 9, PartitionStartSector = 25845 }, - }, - // Mac OS 7.1.1 - new []{ - new Partition{ PartitionDescription = null, PartitionLength = 8704, PartitionName = null, PartitionType = "Apple_Driver", PartitionStart = 32768, PartitionSectors = 17, - PartitionSequence = 0, PartitionStartSector = 64 }, - new Partition{ PartitionDescription = null, PartitionLength = 16384, PartitionName = "Macintosh", PartitionType = "Apple_Driver43", PartitionStart = 32768, PartitionSectors = 32, - PartitionSequence = 1, PartitionStartSector = 64 }, - new Partition{ PartitionDescription = null, PartitionLength = 5148160, PartitionName = "MacOS", PartitionType = "Apple_HFS", PartitionStart = 7294464, PartitionSectors = 10055, - PartitionSequence = 2, PartitionStartSector = 14247 }, - new Partition{ PartitionDescription = null, PartitionLength = 2097152, PartitionName = "ProDOS", PartitionType = "Apple_PRODOS", PartitionStart = 5197312, PartitionSectors = 4096, - PartitionSequence = 3, PartitionStartSector = 10151 }, - new Partition{ PartitionDescription = null, PartitionLength = 3996672, PartitionName = "A/UX Root", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 24081408, PartitionSectors = 7806, - PartitionSequence = 4, PartitionStartSector = 47034 }, - new Partition{ PartitionDescription = null, PartitionLength = 1486848, PartitionName = "Random A/UX fs", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 49152, PartitionSectors = 2904, - PartitionSequence = 5, PartitionStartSector = 96 }, - new Partition{ PartitionDescription = null, PartitionLength = 4406784, PartitionName = "Extra", PartitionType = "Apple_Free", PartitionStart = 12442624, PartitionSectors = 8607, - PartitionSequence = 6, PartitionStartSector = 24302 }, - new Partition{ PartitionDescription = null, PartitionLength = 2485760, PartitionName = "Random A/UX fs", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 16849408, PartitionSectors = 4855, - PartitionSequence = 7, PartitionStartSector = 32909 }, - new Partition{ PartitionDescription = null, PartitionLength = 4746240, PartitionName = "Extra", PartitionType = "Apple_Free", PartitionStart = 19335168, PartitionSectors = 9270, - PartitionSequence = 8, PartitionStartSector = 37764 }, - new Partition{ PartitionDescription = null, PartitionLength = 2097152, PartitionName = "ProDOS", PartitionType = "Apple_PRODOS", PartitionStart = 1536000, PartitionSectors = 4096, - PartitionSequence = 9, PartitionStartSector = 3000 }, - new Partition{ PartitionDescription = null, PartitionLength = 1564160, PartitionName = "Extra", PartitionType = "Apple_Free", PartitionStart = 3633152, PartitionSectors = 3055, - PartitionSequence = 10, PartitionStartSector = 7096 }, - }, - // Mac OS 7.5 - new []{ - new Partition{ PartitionDescription = null, PartitionLength = 9216, PartitionName = null, PartitionType = "Apple_Driver", PartitionStart = 32768, PartitionSectors = 18, - PartitionSequence = 0, PartitionStartSector = 64 }, - new Partition{ PartitionDescription = null, PartitionLength = 16384, PartitionName = "Macintosh", PartitionType = "Apple_Driver43", PartitionStart = 32768, PartitionSectors = 32, - PartitionSequence = 1, PartitionStartSector = 64 }, - new Partition{ PartitionDescription = null, PartitionLength = 28028928, PartitionName = "MacOS", PartitionType = "Apple_HFS", PartitionStart = 49152, PartitionSectors = 54744, - PartitionSequence = 2, PartitionStartSector = 96 }, - }, - // GNU Parted - new []{ - new Partition{ PartitionDescription = null, PartitionLength = 47185920, PartitionName = "untitled", PartitionType = "Apple_HFS", PartitionStart = 2097152, PartitionSectors = 92160, - PartitionSequence = 0, PartitionStartSector = 4096 }, - new Partition{ PartitionDescription = null, PartitionLength = 84934656, PartitionName = "untitled", PartitionType = "Apple_UNIX_SVR2", PartitionStart = 49283072, PartitionSectors = 165888, - PartitionSequence = 1, PartitionStartSector = 96256 }, - new Partition{ PartitionDescription = null, PartitionLength = 2064384, PartitionName = "Extra", PartitionType = "Apple_Free", PartitionStart = 32768, PartitionSectors = 4032, - PartitionSequence = 2, PartitionStartSector = 64 }, - }, - // Silverlining 2.2.1 - new []{ - new Partition{ PartitionDescription = null, PartitionLength = 3072, PartitionName = null, PartitionType = "Apple_Driver", PartitionStart = 32768, PartitionSectors = 6, - PartitionSequence = 0, PartitionStartSector = 64 }, - new Partition{ PartitionDescription = null, PartitionLength = 25088, PartitionName = null, PartitionType = "Apple_Driver", PartitionStart = 98304, PartitionSectors = 49, - PartitionSequence = 1, PartitionStartSector = 192 }, - new Partition{ PartitionDescription = null, PartitionLength = 65536, PartitionName = "Macintosh_SL", PartitionType = "Apple_Driver43", PartitionStart = 32768, PartitionSectors = 128, - PartitionSequence = 2, PartitionStartSector = 64 }, - new Partition{ PartitionDescription = null, PartitionLength = 65536, PartitionName = "Macintosh_SL", PartitionType = "Apple_Driver_ATA", PartitionStart = 98304, PartitionSectors = 128, - PartitionSequence = 3, PartitionStartSector = 192 }, - new Partition{ PartitionDescription = null, PartitionLength = 25804800, PartitionName = "Untitled #1", PartitionType = "Apple_HFS", PartitionStart = 163840, PartitionSectors = 50400, - PartitionSequence = 4, PartitionStartSector = 320 }, - new Partition{ PartitionDescription = null, PartitionLength = 237568, PartitionName = "Extra", PartitionType = "Apple_Free", PartitionStart = 25968640, PartitionSectors = 464, - PartitionSequence = 5, PartitionStartSector = 50720 }, - }, - // Hard Disk Speed Tools 3.6 - new []{ - new Partition{ PartitionDescription = null, PartitionLength = 13824, PartitionName = null, PartitionType = "Apple_Driver", PartitionStart = 32768, PartitionSectors = 27, - PartitionSequence = 0, PartitionStartSector = 64 }, - new Partition{ PartitionDescription = null, PartitionLength = 51200, PartitionName = "Macintosh", PartitionType = "Apple_Driver43", PartitionStart = 32768, PartitionSectors = 100, - PartitionSequence = 1, PartitionStartSector = 64 }, - new Partition{ PartitionDescription = null, PartitionLength = 25165824, PartitionName = "untitled", PartitionType = "Apple_HFS", PartitionStart = 83968, PartitionSectors = 49152, - PartitionSequence = 2, PartitionStartSector = 164 }, - new Partition{ PartitionDescription = null, PartitionLength = 963584, PartitionName = "Extra", PartitionType = "Apple_Free", PartitionStart = 25249792, PartitionSectors = 1882, - PartitionSequence = 3, PartitionStartSector = 49316 }, - }, - // VCP Formatter 2.1.1 - new []{ - new Partition{ PartitionDescription = null, PartitionLength = 12288, PartitionName = null, PartitionType = "Apple_Driver", PartitionStart = 57344, PartitionSectors = 24, - PartitionSequence = 0, PartitionStartSector = 112 }, - new Partition{ PartitionDescription = null, PartitionLength = 16384, PartitionName = "Macintosh", PartitionType = "Apple_Driver", PartitionStart = 57344, PartitionSectors = 32, - PartitionSequence = 1, PartitionStartSector = 112 }, - new Partition{ PartitionDescription = null, PartitionLength = 16384, PartitionName = "Extra", PartitionType = "Apple_Free", PartitionStart = 73728, PartitionSectors = 32, - PartitionSequence = 2, PartitionStartSector = 144 }, - new Partition{ PartitionDescription = null, PartitionLength = 27986944, PartitionName = "MacOS", PartitionType = "Apple_HFS", PartitionStart = 90112, PartitionSectors = 54662, - PartitionSequence = 3, PartitionStartSector = 176 }, - // TODO: ADFS tries to read past this partition... - new Partition{ PartitionDescription = null, PartitionLength = 1024, PartitionName = "Extra", PartitionType = "Apple_Free", PartitionStart = 28077056, PartitionSectors = 2, - PartitionSequence = 4, PartitionStartSector = 54838 }, + new Partition{ PartitionDescription = null, PartitionLength = 7340032, PartitionName = null, PartitionType = "GEM", PartitionStart = 1024, PartitionSectors = 14336, + PartitionSequence = 0, PartitionStartSector = 2 }, + new Partition{ PartitionDescription = null, PartitionLength = 7340032, PartitionName = null, PartitionType = "GEM", PartitionStart = 7341056, PartitionSectors = 14336, + PartitionSequence = 1, PartitionStartSector = 14338 }, + new Partition{ PartitionDescription = null, PartitionLength = 7340032, PartitionName = null, PartitionType = "GEM", PartitionStart = 14681088, PartitionSectors = 14336, + PartitionSequence = 2, PartitionStartSector = 28674 }, + new Partition{ PartitionDescription = null, PartitionLength = 7339008, PartitionName = null, PartitionType = "GEM", PartitionStart = 22021120, PartitionSectors = 14334, + PartitionSequence = 3, PartitionStartSector = 43010 }, }, }; @@ -476,12 +117,12 @@ namespace DiscImageChef.Tests.Partitions { for(int i = 0; i < testfiles.Length; i++) { - string location = Path.Combine(Consts.TestFilesRoot, "partitions", "apm", testfiles[i]); + string location = Path.Combine(Consts.TestFilesRoot, "partitions", "atari", testfiles[i]); Filter filter = new LZip(); filter.Open(location); ImagePlugin image = new VDI(); Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]); - PartPlugin parts = new DiscImageChef.PartPlugins.AppleMap(); + PartPlugin parts = new DiscImageChef.PartPlugins.AtariPartitions(); Assert.AreEqual(true, parts.GetInformation(image, out List partitions), testfiles[i]); Assert.AreEqual(wanted[i].Length, partitions.Count, testfiles[i]); for(int j = 0; j < partitions.Count; j++) diff --git a/DiscImageChef.Tests/Partitions/BSD.cs b/DiscImageChef.Tests/Partitions/BSD.cs index efd31fe2b..7f05ca495 100644 --- a/DiscImageChef.Tests/Partitions/BSD.cs +++ b/DiscImageChef.Tests/Partitions/BSD.cs @@ -2,7 +2,7 @@ // The Disc Image Chef // ---------------------------------------------------------------------------- // -// Filename : Atari.cs +// Filename : BSD.cs // Version : 1.0 // Author(s) : Natalia Portillo // @@ -39,7 +39,6 @@ using System.Collections.Generic; using System.IO; using DiscImageChef.CommonTypes; using DiscImageChef.DiscImages; -using DiscImageChef.Filesystems; using DiscImageChef.Filters; using DiscImageChef.ImagePlugins; using DiscImageChef.PartPlugins; @@ -48,81 +47,37 @@ using NUnit.Framework; namespace DiscImageChef.Tests.Partitions { [TestFixture] - public class Atari + public class BSD { readonly string[] testfiles = { - /*"linux_ahdi.vdi.lz",*/"linux_icd.vdi.lz","tos_1.04.vdi.lz", + "parted.vdi.lz", }; - readonly Partition[][] wanted = {/* - // Linux (AHDI) - new []{ - new Partition{ PartitionDescription = null, PartitionLength = 31457280, PartitionName = null, PartitionType = "GEM", PartitionStart = 512, PartitionSectors = 61440, - PartitionSequence = 0, PartitionStartSector = 1 }, - new Partition{ PartitionDescription = null, PartitionLength = 41943040, PartitionName = null, PartitionType = "BGM", PartitionStart = 31457792, PartitionSectors = 81920, - PartitionSequence = 1, PartitionStartSector = 61441 }, - new Partition{ PartitionDescription = null, PartitionLength = 56402432, PartitionName = null, PartitionType = "LNX", PartitionStart = 73400832, PartitionSectors = 110161, - PartitionSequence = 2, PartitionStartSector = 143361 }, - new Partition{ PartitionDescription = null, PartitionLength = 43212800, PartitionName = null, PartitionType = "MAC", PartitionStart = 129803264, PartitionSectors = 84400, - PartitionSequence = 3, PartitionStartSector = 253522 }, - new Partition{ PartitionDescription = null, PartitionLength = 57671680, PartitionName = null, PartitionType = "MIX", PartitionStart = 173016064, PartitionSectors = 112640, - PartitionSequence = 4, PartitionStartSector = 337922 }, - new Partition{ PartitionDescription = null, PartitionLength = 62914560, PartitionName = null, PartitionType = "MNX", PartitionStart = 230687744, PartitionSectors = 122880, - PartitionSequence = 5, PartitionStartSector = 450562 }, - new Partition{ PartitionDescription = null, PartitionLength = 73400320, PartitionName = null, PartitionType = "RAW", PartitionStart = 293602304, PartitionSectors = 143360, - PartitionSequence = 6, PartitionStartSector = 573442 }, - new Partition{ PartitionDescription = null, PartitionLength = 78643200, PartitionName = null, PartitionType = "SWP", PartitionStart = 367002624, PartitionSectors = 153600, - PartitionSequence = 7, PartitionStartSector = 716802 }, - new Partition{ PartitionDescription = null, PartitionLength = 1048576, PartitionName = null, PartitionType = "UNX", PartitionStart = 445645824, PartitionSectors = 2048, - PartitionSequence = 8, PartitionStartSector = 870402 }, - new Partition{ PartitionDescription = null, PartitionLength = 77593600, PartitionName = null, PartitionType = "LNX", PartitionStart = 446694400, PartitionSectors = 151550, - PartitionSequence = 9, PartitionStartSector = 872450 }, - },*/ - // Linux (ICD) + readonly Partition[][] wanted = { + // Parted new []{ - new Partition{ PartitionDescription = null, PartitionLength = 15728640, PartitionName = null, PartitionType = "GEM", PartitionStart = 512, PartitionSectors = 30720, - PartitionSequence = 0, PartitionStartSector = 1 }, - new Partition{ PartitionDescription = null, PartitionLength = 20971520, PartitionName = null, PartitionType = "UNX", PartitionStart = 15729152, PartitionSectors = 40960, - PartitionSequence = 1, PartitionStartSector = 30721 }, - new Partition{ PartitionDescription = null, PartitionLength = 31457280, PartitionName = null, PartitionType = "LNX", PartitionStart = 36700672, PartitionSectors = 61440, - PartitionSequence = 2, PartitionStartSector = 71681 }, - new Partition{ PartitionDescription = null, PartitionLength = 41943040, PartitionName = null, PartitionType = "BGM", PartitionStart = 68157952, PartitionSectors = 81920, - PartitionSequence = 3, PartitionStartSector = 133121 }, - new Partition{ PartitionDescription = null, PartitionLength = 52428800, PartitionName = null, PartitionType = "MAC", PartitionStart = 110100992, PartitionSectors = 102400, - PartitionSequence = 4, PartitionStartSector = 215041 }, - new Partition{ PartitionDescription = null, PartitionLength = 62914560, PartitionName = null, PartitionType = "MIX", PartitionStart = 162529792, PartitionSectors = 122880, - PartitionSequence = 5, PartitionStartSector = 317441 }, - new Partition{ PartitionDescription = null, PartitionLength = 83886080, PartitionName = null, PartitionType = "SWP", PartitionStart = 225444352, PartitionSectors = 163840, - PartitionSequence = 6, PartitionStartSector = 440321 }, - new Partition{ PartitionDescription = null, PartitionLength = 103809024, PartitionName = null, PartitionType = "MNX", PartitionStart = 309330432, PartitionSectors = 202752, - PartitionSequence = 7, PartitionStartSector = 604161 }, - new Partition{ PartitionDescription = null, PartitionLength = 104857600, PartitionName = null, PartitionType = "LNX", PartitionStart = 413139456, PartitionSectors = 204800, - PartitionSequence = 8, PartitionStartSector = 806913 }, + new Partition{ PartitionDescription = null, PartitionLength = 38797312, PartitionName = null, PartitionType = "???", PartitionStart = 1048576, PartitionSectors = 75776, + PartitionSequence = 0, PartitionStartSector = 2048 }, + new Partition{ PartitionDescription = null, PartitionLength = 19922944, PartitionName = null, PartitionType = "???", PartitionStart = 40894464, PartitionSectors = 38912, + PartitionSequence = 1, PartitionStartSector = 79872 }, + new Partition{ PartitionDescription = null, PartitionLength = 48234496, PartitionName = null, PartitionType = "???", PartitionStart = 61865984, PartitionSectors = 94208, + PartitionSequence = 2, PartitionStartSector = 120832 }, }, - // TOS 1.04 - new []{ - new Partition{ PartitionDescription = null, PartitionLength = 7340032, PartitionName = null, PartitionType = "GEM", PartitionStart = 1024, PartitionSectors = 14336, - PartitionSequence = 0, PartitionStartSector = 2 }, - new Partition{ PartitionDescription = null, PartitionLength = 7340032, PartitionName = null, PartitionType = "GEM", PartitionStart = 7341056, PartitionSectors = 14336, - PartitionSequence = 1, PartitionStartSector = 14338 }, - new Partition{ PartitionDescription = null, PartitionLength = 7340032, PartitionName = null, PartitionType = "GEM", PartitionStart = 14681088, PartitionSectors = 14336, - PartitionSequence = 2, PartitionStartSector = 28674 }, - new Partition{ PartitionDescription = null, PartitionLength = 7339008, PartitionName = null, PartitionType = "GEM", PartitionStart = 22021120, PartitionSectors = 14334, - PartitionSequence = 3, PartitionStartSector = 43010 }, - }, - }; + }; [Test] public void Test() { + throw new System.NotImplementedException("Partition schemes inside partitions are not yet implemented, and should be tested here."); + /* for(int i = 0; i < testfiles.Length; i++) { - string location = Path.Combine(Consts.TestFilesRoot, "partitions", "apm", testfiles[i]); + string location = Path.Combine(Consts.TestFilesRoot, "partitions", "bsd", testfiles[i]); Filter filter = new LZip(); filter.Open(location); ImagePlugin image = new VDI(); Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]); - PartPlugin parts = new DiscImageChef.PartPlugins.AtariPartitions(); + PartPlugin parts = new DiscImageChef.PartPlugins.BSD(); Assert.AreEqual(true, parts.GetInformation(image, out List partitions), testfiles[i]); Assert.AreEqual(wanted[i].Length, partitions.Count, testfiles[i]); for(int j = 0; j < partitions.Count; j++) @@ -137,7 +92,7 @@ namespace DiscImageChef.Tests.Partitions Assert.AreEqual(wanted[i][j].PartitionSequence, partitions[j].PartitionSequence, testfiles[i]); Assert.AreEqual(wanted[i][j].PartitionStartSector, partitions[j].PartitionStartSector, testfiles[i]); } - } + }*/ } } } diff --git a/DiscImageChef.Tests/Partitions/GPT.cs b/DiscImageChef.Tests/Partitions/GPT.cs index 0d5d3a9f4..10e8338bb 100644 --- a/DiscImageChef.Tests/Partitions/GPT.cs +++ b/DiscImageChef.Tests/Partitions/GPT.cs @@ -48,35 +48,50 @@ using NUnit.Framework; namespace DiscImageChef.Tests.Partitions { [TestFixture] - public class BSD + public class GPT { readonly string[] testfiles = { - "parted.vdi.lz", + "linux.vdi.lz","parted.vdi.lz", }; readonly Partition[][] wanted = { + // Linux + new []{ + new Partition{ PartitionDescription = null, PartitionLength = 10485760, PartitionName = null, PartitionType = "EFI System", PartitionStart = 1048576, PartitionSectors = 20480, + PartitionSequence = 0, PartitionStartSector = 2048 }, + new Partition{ PartitionDescription = null, PartitionLength = 15728640, PartitionName = null, PartitionType = "Microsoft Basic data", PartitionStart = 11534336, PartitionSectors = 30720, + PartitionSequence = 1, PartitionStartSector = 22528 }, + new Partition{ PartitionDescription = null, PartitionLength = 20971520, PartitionName = null, PartitionType = "Apple Label", PartitionStart = 27262976, PartitionSectors = 40960, + PartitionSequence = 2, PartitionStartSector = 53248 }, + new Partition{ PartitionDescription = null, PartitionLength = 26214400, PartitionName = null, PartitionType = "Solaris /usr or Apple ZFS", PartitionStart = 48234496, PartitionSectors = 51200, + PartitionSequence = 3, PartitionStartSector = 94208 }, + new Partition{ PartitionDescription = null, PartitionLength = 31457280, PartitionName = null, PartitionType = "FreeBSD ZFS", PartitionStart = 74448896, PartitionSectors = 61440, + PartitionSequence = 4, PartitionStartSector = 145408 }, + new Partition{ PartitionDescription = null, PartitionLength = 28294656, PartitionName = null, PartitionType = "HP-UX Data", PartitionStart = 105906176, PartitionSectors = 55263, + PartitionSequence = 5, PartitionStartSector = 206848 }, + }, // Parted new []{ - new Partition{ PartitionDescription = null, PartitionLength = 38797312, PartitionName = null, PartitionType = "???", PartitionStart = 1048576, PartitionSectors = 75776, + new Partition{ PartitionDescription = null, PartitionLength = 42991616, PartitionName = null, PartitionType = "Apple HFS", PartitionStart = 1048576, PartitionSectors = 83968, PartitionSequence = 0, PartitionStartSector = 2048 }, - new Partition{ PartitionDescription = null, PartitionLength = 19922944, PartitionName = null, PartitionType = "???", PartitionStart = 40894464, PartitionSectors = 38912, - PartitionSequence = 1, PartitionStartSector = 79872 }, - new Partition{ PartitionDescription = null, PartitionLength = 48234496, PartitionName = null, PartitionType = "???", PartitionStart = 61865984, PartitionSectors = 94208, - PartitionSequence = 2, PartitionStartSector = 120832 }, + new Partition{ PartitionDescription = null, PartitionLength = 52428800, PartitionName = null, PartitionType = "Linux filesystem", PartitionStart = 44040192, PartitionSectors = 102400, + PartitionSequence = 1, PartitionStartSector = 86016 }, + new Partition{ PartitionDescription = null, PartitionLength = 36700160, PartitionName = null, PartitionType = "Microsoft Basic data", PartitionStart = 96468992, PartitionSectors = 71680, + PartitionSequence = 2, PartitionStartSector = 188416 }, }, - }; + }; [Test] public void Test() { for(int i = 0; i < testfiles.Length; i++) { - string location = Path.Combine(Consts.TestFilesRoot, "partitions", "bsd", testfiles[i]); + string location = Path.Combine(Consts.TestFilesRoot, "partitions", "gpt", testfiles[i]); Filter filter = new LZip(); filter.Open(location); ImagePlugin image = new VDI(); Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]); - PartPlugin parts = new DiscImageChef.PartPlugins.BSD(); + PartPlugin parts = new DiscImageChef.PartPlugins.GuidPartitionTable(); Assert.AreEqual(true, parts.GetInformation(image, out List partitions), testfiles[i]); Assert.AreEqual(wanted[i].Length, partitions.Count, testfiles[i]); for(int j = 0; j < partitions.Count; j++) diff --git a/DiscImageChef.Tests/Partitions/MBR.cs b/DiscImageChef.Tests/Partitions/MBR.cs index 0d5d3a9f4..260b5aa44 100644 --- a/DiscImageChef.Tests/Partitions/MBR.cs +++ b/DiscImageChef.Tests/Partitions/MBR.cs @@ -2,7 +2,7 @@ // The Disc Image Chef // ---------------------------------------------------------------------------- // -// Filename : BSD.cs +// Filename : MBR.cs // Version : 1.0 // Author(s) : Natalia Portillo // @@ -48,21 +48,518 @@ using NUnit.Framework; namespace DiscImageChef.Tests.Partitions { [TestFixture] - public class BSD + public class MBR { readonly string[] testfiles = { - "parted.vdi.lz", + "concurrentdos_6.0.vdi.lz","darwin_1.4.1.vdi.lz","darwin_6.0.2.vdi.lz","darwin_8.0.1.vdi.lz", + "drdos_3.40.vdi.lz","drdos_3.41.vdi.lz","drdos_5.00.vdi.lz","drdos_6.00.vdi.lz", + "drdos_7.02.vdi.lz","drdos_7.03.vdi.lz","drdos_8.0.vdi.lz","linux.vdi.lz", + "macosx_10.3.vdi.lz","macosx_10.4.vdi.lz","msdos_3.30a.vdi.lz","msdos_5.00.vdi.lz", + "msdos_6.00.vdi.lz","msdos_6.20.vdi.lz","msdos_6.21.vdi.lz","msdos_6.22.vdi.lz", + "multiuserdos_7.22r04.vdi.lz","novelldos_7.00.vdi.lz","opendos_7.01.vdi.lz","parted.vdi.lz", + "pcdos_2000.vdi.lz","pcdos_2.00.vdi.lz","pcdos_2.10.vdi.lz","pcdos_3.00.vdi.lz", + "pcdos_3.10.vdi.lz","pcdos_3.30.vdi.lz","pcdos_4.00.vdi.lz","pcdos_5.00.vdi.lz", + "pcdos_6.10.vdi.lz","win95.vdi.lz","win96osr25.vdi.lz","winnt_3.10.vdi.lz", }; readonly Partition[][] wanted = { + // Concurrent DOS 6.0 + new []{ + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x04", PartitionSectors = 100800, + PartitionSequence = 0, PartitionStartSector = 1008 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x04", PartitionSectors = 99792, + PartitionSequence = 1, PartitionStartSector = 102816 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x04", PartitionSectors = 100800, + PartitionSequence = 2, PartitionStartSector = 202608 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x04", PartitionSectors = 303408, + PartitionSequence = 2, PartitionStartSector = 352800 }, + }, + // Darwin 1.4.1 + new []{ + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x07", PartitionSectors = 409248, + PartitionSequence = 0, PartitionStartSector = 409248 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0xA8", PartitionSectors = 204624, + PartitionSequence = 1, PartitionStartSector = 818496 }, + }, + // Darwin 6.0.2 + new []{ + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0xA8", PartitionSectors = 204561, + PartitionSequence = 0, PartitionStartSector = 63 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0xAB", PartitionSectors = 81648, + PartitionSequence = 1, PartitionStartSector = 204624 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 245952, + PartitionSequence = 2, PartitionStartSector = 286272 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 488880, + PartitionSequence = 2, PartitionStartSector = 532224 }, + }, + // Darwin 8.0.1 + new []{ + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 150000, + PartitionSequence = 0, PartitionStartSector = 63 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0xAF", PartitionSectors = 176000, + PartitionSequence = 1, PartitionStartSector = 150063 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0xA8", PartitionSectors = 350000, + PartitionSequence = 2, PartitionStartSector = 326063 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x0C", PartitionSectors = 347937, + PartitionSequence = 2, PartitionStartSector = 676063 }, + }, + // DR-DOS 3.40 + new []{ + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 100800, + PartitionSequence = 0, PartitionStartSector = 1008 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 402129, + PartitionSequence = 1, PartitionStartSector = 101871 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 152145, + PartitionSequence = 2, PartitionStartSector = 504063 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 365841, + PartitionSequence = 2, PartitionStartSector = 656271 }, + }, + // DR-DOS 3.41 + new []{ + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 126945, + PartitionSequence = 0, PartitionStartSector = 63 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 124929, + PartitionSequence = 1, PartitionStartSector = 127071 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 101745, + PartitionSequence = 2, PartitionStartSector = 252063 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 668241, + PartitionSequence = 2, PartitionStartSector = 353871 }, + }, + // DR-DOS 5.00 + new []{ + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 128016, + PartitionSequence = 0, PartitionStartSector = 124992 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 99729, + PartitionSequence = 1, PartitionStartSector = 253071 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 100737, + PartitionSequence = 2, PartitionStartSector = 352863 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 313425, + PartitionSequence = 2, PartitionStartSector = 453663 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 254961, + PartitionSequence = 2, PartitionStartSector = 767151 }, + }, + // DR-DOS 6.00 + new []{ + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 101745, + PartitionSequence = 0, PartitionStartSector = 63 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x01", PartitionSectors = 18081, + PartitionSequence = 1, PartitionStartSector = 102879 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 130977, + PartitionSequence = 2, PartitionStartSector = 121023 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 202545, + PartitionSequence = 2, PartitionStartSector = 252063 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 567441, + PartitionSequence = 2, PartitionStartSector = 454671 }, + }, + // DR-DOS 7.02 + new []{ + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 102753, + PartitionSequence = 0, PartitionStartSector = 63 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 307377, + PartitionSequence = 1, PartitionStartSector = 102879 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 384993, + PartitionSequence = 2, PartitionStartSector = 410319 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x01", PartitionSectors = 17073, + PartitionSequence = 2, PartitionStartSector = 795375 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 209601, + PartitionSequence = 2, PartitionStartSector = 812511 }, + }, + // DR-DOS 7.03 + new []{ + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 202545, + PartitionSequence = 0, PartitionStartSector = 63 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 141057, + PartitionSequence = 1, PartitionStartSector = 202671 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 152145, + PartitionSequence = 2, PartitionStartSector = 352863 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 364833, + PartitionSequence = 2, PartitionStartSector = 505071 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 152145, + PartitionSequence = 2, PartitionStartSector = 869967 }, + }, + // DR-DOS 8.0 + new []{ + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 205569, + PartitionSequence = 0, PartitionStartSector = 63 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 138033, + PartitionSequence = 1, PartitionStartSector = 205695 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 303345, + PartitionSequence = 2, PartitionStartSector = 352863 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 249921, + PartitionSequence = 2, PartitionStartSector = 656271 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 115857, + PartitionSequence = 2, PartitionStartSector = 906255 }, + }, + // Linux + new []{ + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x04", PartitionSectors = 20480, + PartitionSequence = 0, PartitionStartSector = 2048 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x24", PartitionSectors = 40960, + PartitionSequence = 1, PartitionStartSector = 22528 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0xA7", PartitionSectors = 61440, + PartitionSequence = 2, PartitionStartSector = 65536 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x42", PartitionSectors = 81920, + PartitionSequence = 2, PartitionStartSector = 129024 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x83", PartitionSectors = 49152, + PartitionSequence = 2, PartitionStartSector = 212992 }, + }, + // Mac OS X 10.3 + new []{ + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0xA8", PartitionSectors = 204800, + PartitionSequence = 0, PartitionStartSector = 8 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0xAF", PartitionSectors = 102400, + PartitionSequence = 1, PartitionStartSector = 204816 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x0B", PartitionSectors = 102400, + PartitionSequence = 2, PartitionStartSector = 307224 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0xAF", PartitionSectors = 204800, + PartitionSequence = 0, PartitionStartSector = 409632 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0xAF", PartitionSectors = 204800, + PartitionSequence = 1, PartitionStartSector = 614440 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0xAF", PartitionSectors = 204752, + PartitionSequence = 2, PartitionStartSector = 819248 }, + }, + // Mac OS X 10.4 + new []{ + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0xAF", PartitionSectors = 102400, + PartitionSequence = 0, PartitionStartSector = 63 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0xAF", PartitionSectors = 204800, + PartitionSequence = 1, PartitionStartSector = 102501 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x0B", PartitionSectors = 204800, + PartitionSequence = 2, PartitionStartSector = 307314 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0xA8", PartitionSectors = 204800, + PartitionSequence = 0, PartitionStartSector = 512127 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 102400, + PartitionSequence = 1, PartitionStartSector = 716940 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0xAF", PartitionSectors = 204624, + PartitionSequence = 2, PartitionStartSector = 819378 }, + }, + // MS-DOS 3.30A + new []{ + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x04", PartitionSectors = 65457, + PartitionSequence = 0, PartitionStartSector = 63 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x04", PartitionSectors = 65457, + PartitionSequence = 1, PartitionStartSector = 65583 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x04", PartitionSectors = 65457, + PartitionSequence = 2, PartitionStartSector = 131103 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x04", PartitionSectors = 65457, + PartitionSequence = 2, PartitionStartSector = 196623 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x04", PartitionSectors = 65457, + PartitionSequence = 2, PartitionStartSector = 262143 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x04", PartitionSectors = 65457, + PartitionSequence = 2, PartitionStartSector = 327663 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x04", PartitionSectors = 65457, + PartitionSequence = 2, PartitionStartSector = 393183 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x04", PartitionSectors = 65457, + PartitionSequence = 2, PartitionStartSector = 458703 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x04", PartitionSectors = 65457, + PartitionSequence = 2, PartitionStartSector = 524223 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x04", PartitionSectors = 65457, + PartitionSequence = 2, PartitionStartSector = 589743 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x04", PartitionSectors = 65457, + PartitionSequence = 2, PartitionStartSector = 655263 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x04", PartitionSectors = 65457, + PartitionSequence = 2, PartitionStartSector = 720783 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x04", PartitionSectors = 65457, + PartitionSequence = 2, PartitionStartSector = 786303 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x04", PartitionSectors = 65457, + PartitionSequence = 2, PartitionStartSector = 851823 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x04", PartitionSectors = 65457, + PartitionSequence = 2, PartitionStartSector = 917343 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x04", PartitionSectors = 39249, + PartitionSequence = 2, PartitionStartSector = 982863 }, + }, + // MS-DOS 5.00 + new []{ + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 102753, + PartitionSequence = 0, PartitionStartSector = 63 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x01", PartitionSectors = 31185, + PartitionSequence = 1, PartitionStartSector = 102879 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x04", PartitionSectors = 41265, + PartitionSequence = 2, PartitionStartSector = 134127 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x04", PartitionSectors = 51345, + PartitionSequence = 2, PartitionStartSector = 175455 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x04", PartitionSectors = 61425, + PartitionSequence = 2, PartitionStartSector = 226863 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 72513, + PartitionSequence = 2, PartitionStartSector = 288351 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 82593, + PartitionSequence = 2, PartitionStartSector = 360927 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 92673, + PartitionSequence = 2, PartitionStartSector = 443583 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 102753, + PartitionSequence = 2, PartitionStartSector = 536319 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 112833, + PartitionSequence = 2, PartitionStartSector = 639135 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 122913, + PartitionSequence = 2, PartitionStartSector = 752031 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 134001, + PartitionSequence = 2, PartitionStartSector = 875007 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x01", PartitionSectors = 13041, + PartitionSequence = 2, PartitionStartSector = 1009071 }, + }, + // MS-DOS 6.00 + new []{ + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x04", PartitionSectors = 51345, + PartitionSequence = 0, PartitionStartSector = 63 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 72513, + PartitionSequence = 1, PartitionStartSector = 51471 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 92673, + PartitionSequence = 2, PartitionStartSector = 124047 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 112833, + PartitionSequence = 2, PartitionStartSector = 216783 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 134001, + PartitionSequence = 2, PartitionStartSector = 329679 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 154161, + PartitionSequence = 2, PartitionStartSector = 463743 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 178353, + PartitionSequence = 2, PartitionStartSector = 617967 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 184401, + PartitionSequence = 2, PartitionStartSector = 796383 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x04", PartitionSectors = 41265, + PartitionSequence = 2, PartitionStartSector = 980847 }, + }, + // MS-DOS 6.20 + new []{ + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 205569, + PartitionSequence = 0, PartitionStartSector = 63 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 225729, + PartitionSequence = 1, PartitionStartSector = 205695 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 245889, + PartitionSequence = 2, PartitionStartSector = 431487 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 267057, + PartitionSequence = 2, PartitionStartSector = 677439 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x04", PartitionSectors = 61425, + PartitionSequence = 2, PartitionStartSector = 944559 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x01", PartitionSectors = 16065, + PartitionSequence = 2, PartitionStartSector = 1006047 }, + }, + // MS-DOS 6.21 + new []{ + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 205569, + PartitionSequence = 0, PartitionStartSector = 63 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 225729, + PartitionSequence = 1, PartitionStartSector = 205695 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 245889, + PartitionSequence = 2, PartitionStartSector = 431487 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 267057, + PartitionSequence = 2, PartitionStartSector = 677439 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x04", PartitionSectors = 51345, + PartitionSequence = 2, PartitionStartSector = 944559 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x01", PartitionSectors = 6993, + PartitionSequence = 2, PartitionStartSector = 995967 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x01", PartitionSectors = 19089, + PartitionSequence = 2, PartitionStartSector = 1003023 }, + }, + // MS-DOS 6.22 + new []{ + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 245889, + PartitionSequence = 0, PartitionStartSector = 63 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 205569, + PartitionSequence = 1, PartitionStartSector = 246015 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 307377, + PartitionSequence = 2, PartitionStartSector = 451647 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 225729, + PartitionSequence = 2, PartitionStartSector = 759087 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x04", PartitionSectors = 37233, + PartitionSequence = 2, PartitionStartSector = 984879 }, + }, + // Multiuser DOS 7.22 release 04 + new []{ + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 152145, + PartitionSequence = 0, PartitionStartSector = 63 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 99729, + PartitionSequence = 1, PartitionStartSector = 152271 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 202545, + PartitionSequence = 2, PartitionStartSector = 252063 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x01", PartitionSectors = 1953, + PartitionSequence = 2, PartitionStartSector = 454671 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 565425, + PartitionSequence = 2, PartitionStartSector = 456687 }, + }, + // Novell DOS 7.0 + new []{ + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 252945, + PartitionSequence = 0, PartitionStartSector = 63 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x01", PartitionSectors = 4977, + PartitionSequence = 1, PartitionStartSector = 253071 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 202545, + PartitionSequence = 2, PartitionStartSector = 352863 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 348705, + PartitionSequence = 2, PartitionStartSector = 555471 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 117873, + PartitionSequence = 2, PartitionStartSector = 904239 }, + }, + // OpenDOS 7.01 + new []{ + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 307377, + PartitionSequence = 0, PartitionStartSector = 63 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 4977, + PartitionSequence = 1, PartitionStartSector = 307503 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x01", PartitionSectors = 40257, + PartitionSequence = 2, PartitionStartSector = 312543 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x04", PartitionSectors = 202545, + PartitionSequence = 2, PartitionStartSector = 352863 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 466641, + PartitionSequence = 2, PartitionStartSector = 555471 }, + }, // Parted new []{ - new Partition{ PartitionDescription = null, PartitionLength = 38797312, PartitionName = null, PartitionType = "???", PartitionStart = 1048576, PartitionSectors = 75776, - PartitionSequence = 0, PartitionStartSector = 2048 }, - new Partition{ PartitionDescription = null, PartitionLength = 19922944, PartitionName = null, PartitionType = "???", PartitionStart = 40894464, PartitionSectors = 38912, - PartitionSequence = 1, PartitionStartSector = 79872 }, - new Partition{ PartitionDescription = null, PartitionLength = 48234496, PartitionName = null, PartitionType = "???", PartitionStart = 61865984, PartitionSectors = 94208, - PartitionSequence = 2, PartitionStartSector = 120832 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x83", PartitionSectors = 67584, + PartitionSequence = 0, PartitionStartSector = 4096 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x07", PartitionSectors = 59392, + PartitionSequence = 1, PartitionStartSector = 73728 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 129024, + PartitionSequence = 2, PartitionStartSector = 133120 }, + }, + // PC-DOS 2000 + new []{ + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 205569, + PartitionSequence = 0, PartitionStartSector = 63 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 225729, + PartitionSequence = 1, PartitionStartSector = 205695 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 245889, + PartitionSequence = 2, PartitionStartSector = 431487 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 287217, + PartitionSequence = 2, PartitionStartSector = 677439 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x04", PartitionSectors = 57393, + PartitionSequence = 2, PartitionStartSector = 964719 }, + }, + // PC-DOS 2.00 + new []{ + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x01", PartitionSectors = 1022111, + PartitionSequence = 0, PartitionStartSector = 1 }, + }, + // PC-DOS 2.10 + new []{ + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x01", PartitionSectors = 1022111, + PartitionSequence = 0, PartitionStartSector = 1 }, + }, + // PC-DOS 3.00 + new []{ + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x01", PartitionSectors = 66465, + PartitionSequence = 0, PartitionStartSector = 63 }, + }, + // PC-DOS 3.10 + new []{ + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x01", PartitionSectors = 66465, + PartitionSequence = 0, PartitionStartSector = 63 }, + }, + // PC-DOS 3.30 + new []{ + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x04", PartitionSectors = 65457, + PartitionSequence = 0, PartitionStartSector = 63 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x04", PartitionSectors = 65457, + PartitionSequence = 1, PartitionStartSector = 65583 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x04", PartitionSectors = 65457, + PartitionSequence = 2, PartitionStartSector = 131103 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x04", PartitionSectors = 65457, + PartitionSequence = 2, PartitionStartSector = 196623 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x04", PartitionSectors = 65457, + PartitionSequence = 2, PartitionStartSector = 262143 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x04", PartitionSectors = 65457, + PartitionSequence = 2, PartitionStartSector = 327663 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x04", PartitionSectors = 65457, + PartitionSequence = 2, PartitionStartSector = 393183 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x04", PartitionSectors = 65457, + PartitionSequence = 2, PartitionStartSector = 458703 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x04", PartitionSectors = 65457, + PartitionSequence = 2, PartitionStartSector = 524223 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x04", PartitionSectors = 65457, + PartitionSequence = 2, PartitionStartSector = 589743 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x04", PartitionSectors = 65457, + PartitionSequence = 2, PartitionStartSector = 655263 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x04", PartitionSectors = 65457, + PartitionSequence = 2, PartitionStartSector = 720783 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x04", PartitionSectors = 65457, + PartitionSequence = 2, PartitionStartSector = 786303 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x04", PartitionSectors = 65457, + PartitionSequence = 2, PartitionStartSector = 851823 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x04", PartitionSectors = 65457, + PartitionSequence = 2, PartitionStartSector = 917343 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x04", PartitionSectors = 39249, + PartitionSequence = 2, PartitionStartSector = 982863 }, + }, + // PC-DOS 4.00 + new []{ + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 205569, + PartitionSequence = 0, PartitionStartSector = 63 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x01", PartitionSectors = 25137, + PartitionSequence = 1, PartitionStartSector = 205695 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 245889, + PartitionSequence = 2, PartitionStartSector = 230895 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 307377, + PartitionSequence = 2, PartitionStartSector = 476847 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 237825, + PartitionSequence = 2, PartitionStartSector = 784287 }, + }, + // PC-DOS 5.00 + new []{ + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 205569, + PartitionSequence = 0, PartitionStartSector = 63 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x01", PartitionSectors = 25137, + PartitionSequence = 1, PartitionStartSector = 205695 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 245889, + PartitionSequence = 2, PartitionStartSector = 230895 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 287217, + PartitionSequence = 2, PartitionStartSector = 476847 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 257985, + PartitionSequence = 2, PartitionStartSector = 764127 }, + }, + // PC-DOS 6.10 + new []{ + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 205569, + PartitionSequence = 0, PartitionStartSector = 63 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x01", PartitionSectors = 25137, + PartitionSequence = 1, PartitionStartSector = 205695 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 225729, + PartitionSequence = 2, PartitionStartSector = 230895 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 245889, + PartitionSequence = 2, PartitionStartSector = 456687 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 319473, + PartitionSequence = 2, PartitionStartSector = 702639 }, + }, + // Windows 95 + new []{ + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 205569, + PartitionSequence = 0, PartitionStartSector = 63 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 245889, + PartitionSequence = 1, PartitionStartSector = 205695 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 267057, + PartitionSequence = 2, PartitionStartSector = 451647 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 287217, + PartitionSequence = 2, PartitionStartSector = 718767 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x01", PartitionSectors = 17073, + PartitionSequence = 2, PartitionStartSector = 1006047 }, + }, + // Windows 95 OSR 2.5 + new []{ + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 307377, + PartitionSequence = 0, PartitionStartSector = 63 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 245889, + PartitionSequence = 1, PartitionStartSector = 307503 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 328545, + PartitionSequence = 2, PartitionStartSector = 553455 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 102753, + PartitionSequence = 2, PartitionStartSector = 882063 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x01", PartitionSectors = 21105, + PartitionSequence = 2, PartitionStartSector = 984879 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x01", PartitionSectors = 17073, + PartitionSequence = 2, PartitionStartSector = 1006047 }, + }, + // Windows NT 3.10 + new []{ + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x07", PartitionSectors = 204561, + PartitionSequence = 0, PartitionStartSector = 63 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x07", PartitionSectors = 60480, + PartitionSequence = 1, PartitionStartSector = 962640 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x07", PartitionSectors = 307377, + PartitionSequence = 2, PartitionStartSector = 204687 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 224721, + PartitionSequence = 2, PartitionStartSector = 512127 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x06", PartitionSectors = 214641, + PartitionSequence = 2, PartitionStartSector = 736911 }, + new Partition{ PartitionDescription = null, PartitionName = null, PartitionType = "0x01", PartitionSectors = 10017, + PartitionSequence = 2, PartitionStartSector = 951615 }, }, }; @@ -71,22 +568,22 @@ namespace DiscImageChef.Tests.Partitions { for(int i = 0; i < testfiles.Length; i++) { - string location = Path.Combine(Consts.TestFilesRoot, "partitions", "bsd", testfiles[i]); + string location = Path.Combine(Consts.TestFilesRoot, "partitions", "mbr", testfiles[i]); Filter filter = new LZip(); filter.Open(location); ImagePlugin image = new VDI(); Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]); - PartPlugin parts = new DiscImageChef.PartPlugins.BSD(); + PartPlugin parts = new DiscImageChef.PartPlugins.MBR(); Assert.AreEqual(true, parts.GetInformation(image, out List partitions), testfiles[i]); Assert.AreEqual(wanted[i].Length, partitions.Count, testfiles[i]); for(int j = 0; j < partitions.Count; j++) { // Too chatty //Assert.AreEqual(wanted[i][j].PartitionDescription, partitions[j].PartitionDescription, testfiles[i]); - Assert.AreEqual(wanted[i][j].PartitionLength, partitions[j].PartitionLength, testfiles[i]); + Assert.AreEqual(wanted[i][j].PartitionSectors * 512, partitions[j].PartitionLength, testfiles[i]); Assert.AreEqual(wanted[i][j].PartitionName, partitions[j].PartitionName, testfiles[i]); Assert.AreEqual(wanted[i][j].PartitionType, partitions[j].PartitionType, testfiles[i]); - Assert.AreEqual(wanted[i][j].PartitionStart, partitions[j].PartitionStart, testfiles[i]); + Assert.AreEqual(wanted[i][j].PartitionStartSector * 512, partitions[j].PartitionStart, testfiles[i]); Assert.AreEqual(wanted[i][j].PartitionSectors, partitions[j].PartitionSectors, testfiles[i]); Assert.AreEqual(wanted[i][j].PartitionSequence, partitions[j].PartitionSequence, testfiles[i]); Assert.AreEqual(wanted[i][j].PartitionStartSector, partitions[j].PartitionStartSector, testfiles[i]); diff --git a/DiscImageChef.Tests/Partitions/MINIX.cs b/DiscImageChef.Tests/Partitions/MINIX.cs index 58c217afe..260927c9f 100644 --- a/DiscImageChef.Tests/Partitions/MINIX.cs +++ b/DiscImageChef.Tests/Partitions/MINIX.cs @@ -2,7 +2,7 @@ // The Disc Image Chef // ---------------------------------------------------------------------------- // -// Filename : BSD.cs +// Filename : MINIX.cs // Version : 1.0 // Author(s) : Natalia Portillo // @@ -39,7 +39,6 @@ using System.Collections.Generic; using System.IO; using DiscImageChef.CommonTypes; using DiscImageChef.DiscImages; -using DiscImageChef.Filesystems; using DiscImageChef.Filters; using DiscImageChef.ImagePlugins; using DiscImageChef.PartPlugins; @@ -48,30 +47,34 @@ using NUnit.Framework; namespace DiscImageChef.Tests.Partitions { [TestFixture] - public class BSD + public class MINIX { readonly string[] testfiles = { - "parted.vdi.lz", + "minix_3.1.2a.vdi.lz", }; readonly Partition[][] wanted = { // Parted new []{ - new Partition{ PartitionDescription = null, PartitionLength = 38797312, PartitionName = null, PartitionType = "???", PartitionStart = 1048576, PartitionSectors = 75776, - PartitionSequence = 0, PartitionStartSector = 2048 }, - new Partition{ PartitionDescription = null, PartitionLength = 19922944, PartitionName = null, PartitionType = "???", PartitionStart = 40894464, PartitionSectors = 38912, - PartitionSequence = 1, PartitionStartSector = 79872 }, - new Partition{ PartitionDescription = null, PartitionLength = 48234496, PartitionName = null, PartitionType = "???", PartitionStart = 61865984, PartitionSectors = 94208, - PartitionSequence = 2, PartitionStartSector = 120832 }, + new Partition{ PartitionDescription = null, PartitionLength = 268369408, PartitionName = null, PartitionType = "MINIX", PartitionStart = 2064896, PartitionSectors = 524159, + PartitionSequence = 0, PartitionStartSector = 4033 }, + new Partition{ PartitionDescription = null, PartitionLength = 270434304, PartitionName = null, PartitionType = "MINIX", PartitionStart = 270434304, PartitionSectors = 528192, + PartitionSequence = 1, PartitionStartSector = 528192 }, + new Partition{ PartitionDescription = null, PartitionLength = 270434304, PartitionName = null, PartitionType = "MINIX", PartitionStart = 540868608, PartitionSectors = 528192, + PartitionSequence = 2, PartitionStartSector = 1056384 }, + new Partition{ PartitionDescription = null, PartitionLength = 262176768, PartitionName = null, PartitionType = "MINIX", PartitionStart = 811302912, PartitionSectors = 512064, + PartitionSequence = 2, PartitionStartSector = 1584576 }, }, }; [Test] public void Test() { + throw new System.NotImplementedException("Partition schemes inside partitions are not yet implemented, and should be tested here."); + /* for(int i = 0; i < testfiles.Length; i++) { - string location = Path.Combine(Consts.TestFilesRoot, "partitions", "bsd", testfiles[i]); + string location = Path.Combine(Consts.TestFilesRoot, "partitions", "minix", testfiles[i]); Filter filter = new LZip(); filter.Open(location); ImagePlugin image = new VDI(); @@ -91,7 +94,7 @@ namespace DiscImageChef.Tests.Partitions Assert.AreEqual(wanted[i][j].PartitionSequence, partitions[j].PartitionSequence, testfiles[i]); Assert.AreEqual(wanted[i][j].PartitionStartSector, partitions[j].PartitionStartSector, testfiles[i]); } - } + }*/ } } } diff --git a/DiscImageChef.Tests/Partitions/PC98.cs b/DiscImageChef.Tests/Partitions/PC98.cs index 58c217afe..dd0666d8a 100644 --- a/DiscImageChef.Tests/Partitions/PC98.cs +++ b/DiscImageChef.Tests/Partitions/PC98.cs @@ -2,7 +2,7 @@ // The Disc Image Chef // ---------------------------------------------------------------------------- // -// Filename : BSD.cs +// Filename : PC98.cs // Version : 1.0 // Author(s) : Natalia Portillo // @@ -48,7 +48,7 @@ using NUnit.Framework; namespace DiscImageChef.Tests.Partitions { [TestFixture] - public class BSD + public class PC98 { readonly string[] testfiles = { "parted.vdi.lz", @@ -76,7 +76,7 @@ namespace DiscImageChef.Tests.Partitions filter.Open(location); ImagePlugin image = new VDI(); Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]); - PartPlugin parts = new DiscImageChef.PartPlugins.BSD(); + PartPlugin parts = new DiscImageChef.PartPlugins.PC98(); Assert.AreEqual(true, parts.GetInformation(image, out List partitions), testfiles[i]); Assert.AreEqual(wanted[i].Length, partitions.Count, testfiles[i]); for(int j = 0; j < partitions.Count; j++) diff --git a/DiscImageChef.Tests/Partitions/RDB.cs b/DiscImageChef.Tests/Partitions/RDB.cs index c1ab68b9e..732268bab 100644 --- a/DiscImageChef.Tests/Partitions/RDB.cs +++ b/DiscImageChef.Tests/Partitions/RDB.cs @@ -2,7 +2,7 @@ // The Disc Image Chef // ---------------------------------------------------------------------------- // -// Filename : Atari.cs +// Filename : RDB.cs // Version : 1.0 // Author(s) : Natalia Portillo // @@ -48,24 +48,51 @@ using NUnit.Framework; namespace DiscImageChef.Tests.Partitions { [TestFixture] - public class Acorn + public class RDB { readonly string[] testfiles = { - "linux_ics.vdi.lz", + "amigaos_3.9.vdi.lz","amigaos_4.0.vdi.lz","parted.vdi.lz", }; readonly Partition[][] wanted = { - // Linux (ICS) - // TODO: Values are incorrect + // AmigaOS 3.9 new []{ - new Partition{ PartitionDescription = null, PartitionLength = 31457280, PartitionName = null, PartitionType = "GEM", PartitionStart = 512, PartitionSectors = 61440, - PartitionSequence = 0, PartitionStartSector = 1 }, - new Partition{ PartitionDescription = null, PartitionLength = 41943040, PartitionName = null, PartitionType = "BGM", PartitionStart = 31457792, PartitionSectors = 81920, - PartitionSequence = 1, PartitionStartSector = 61441 }, - new Partition{ PartitionDescription = null, PartitionLength = 56402432, PartitionName = null, PartitionType = "LNX", PartitionStart = 73400832, PartitionSectors = 110161, - PartitionSequence = 2, PartitionStartSector = 143361 }, - new Partition{ PartitionDescription = null, PartitionLength = 43212800, PartitionName = null, PartitionType = "MAC", PartitionStart = 129803264, PartitionSectors = 84400, - PartitionSequence = 3, PartitionStartSector = 253522 }, + new Partition{ PartitionDescription = null, PartitionLength = 87392256, PartitionName = "UDH0", PartitionType = "\"DOS\\0\"", PartitionStart = 2080768, PartitionSectors = 170688, + PartitionSequence = 0, PartitionStartSector = 4064 }, + new Partition{ PartitionDescription = null, PartitionLength = 87392256, PartitionName = "UDH1", PartitionType = "\"DOS\\2\"", PartitionStart = 89473024, PartitionSectors = 170688, + PartitionSequence = 1, PartitionStartSector = 174752 }, + new Partition{ PartitionDescription = null, PartitionLength = 87392256, PartitionName = "UDH2", PartitionType = "\"DOS\\1\"", PartitionStart = 176865280, PartitionSectors = 170688, + PartitionSequence = 2, PartitionStartSector = 345440 }, + new Partition{ PartitionDescription = null, PartitionLength = 87392256, PartitionName = "UDH3", PartitionType = "\"DOS\\3\"", PartitionStart = 264257536, PartitionSectors = 170688, + PartitionSequence = 3, PartitionStartSector = 516128 }, + new Partition{ PartitionDescription = null, PartitionLength = 87392256, PartitionName = "UDH4", PartitionType = "\"RES\\86\"", PartitionStart = 351649792, PartitionSectors = 170688, + PartitionSequence = 4, PartitionStartSector = 686816 }, + new Partition{ PartitionDescription = null, PartitionLength = 85311488, PartitionName = "UDH5", PartitionType = "\"RES\\86\"", PartitionStart = 439042048, PartitionSectors = 166624, + PartitionSequence = 5, PartitionStartSector = 857504 }, + }, + // AmigaOS 4.0 + new []{ + new Partition{ PartitionDescription = null, PartitionLength = 91455488, PartitionName = "DH1", PartitionType = "\"DOS\\1\"", PartitionStart = 1048576, PartitionSectors = 178624, + PartitionSequence = 0, PartitionStartSector = 2048 }, + new Partition{ PartitionDescription = null, PartitionLength = 92504064, PartitionName = "DH1", PartitionType = "\"DOS\\3\"", PartitionStart = 76546048, PartitionSectors = 149504, + PartitionSequence = 1, PartitionStartSector = 180672 }, + new Partition{ PartitionDescription = null, PartitionLength = 169050112, PartitionName = "DH1", PartitionType = "\"DOS\\3\"", PartitionStart = 78741504, PartitionSectors = 153792, + PartitionSequence = 2, PartitionStartSector = 330176 }, + new Partition{ PartitionDescription = null, PartitionLength = 247791616, PartitionName = "DH1", PartitionType = "\"DOS\\7\"", PartitionStart = 78020608, PartitionSectors = 152384, + PartitionSequence = 3, PartitionStartSector = 483968 }, + new Partition{ PartitionDescription = null, PartitionLength = 325812224, PartitionName = "DH1", PartitionType = "\"SFS\\0\"", PartitionStart = 85000192, PartitionSectors = 166016, + PartitionSequence = 4, PartitionStartSector = 636352 }, + new Partition{ PartitionDescription = null, PartitionLength = 410812416, PartitionName = "DH1", PartitionType = "\"SFS\\2\"", PartitionStart = 113541120, PartitionSectors = 221760, + PartitionSequence = 5, PartitionStartSector = 802368 }, + }, + // AmigaOS 4.0 + new []{ + new Partition{ PartitionDescription = null, PartitionLength = 8225280, PartitionName = "primary", PartitionType = "\"\\0\"", PartitionStart = 8225280, PartitionSectors = 16065, + PartitionSequence = 0, PartitionStartSector = 16065 }, + new Partition{ PartitionDescription = null, PartitionLength = 24675840, PartitionName = "name", PartitionType = "\"FAT\\1\"", PartitionStart = 16450560, PartitionSectors = 48195, + PartitionSequence = 1, PartitionStartSector = 32130 }, + new Partition{ PartitionDescription = null, PartitionLength = 90478080, PartitionName = "partition", PartitionType = "\"\\0\"", PartitionStart = 41126400, PartitionSectors = 176715, + PartitionSequence = 2, PartitionStartSector = 80325 }, }, }; @@ -74,12 +101,12 @@ namespace DiscImageChef.Tests.Partitions { for(int i = 0; i < testfiles.Length; i++) { - string location = Path.Combine(Consts.TestFilesRoot, "partitions", "acorn", testfiles[i]); + string location = Path.Combine(Consts.TestFilesRoot, "partitions", "rdb", testfiles[i]); Filter filter = new LZip(); filter.Open(location); ImagePlugin image = new VDI(); Assert.AreEqual(true, image.OpenImage(filter), testfiles[i]); - PartPlugin parts = new DiscImageChef.PartPlugins.Acorn(); + PartPlugin parts = new DiscImageChef.PartPlugins.AmigaRigidDiskBlock(); Assert.AreEqual(true, parts.GetInformation(image, out List partitions), testfiles[i]); Assert.AreEqual(wanted[i].Length, partitions.Count, testfiles[i]); for(int j = 0; j < partitions.Count; j++)