diff --git a/DiscImageChef.Core/Partitions.cs b/DiscImageChef.Core/Partitions.cs index 4373e1ed..20fb283a 100644 --- a/DiscImageChef.Core/Partitions.cs +++ b/DiscImageChef.Core/Partitions.cs @@ -134,6 +134,21 @@ namespace DiscImageChef.Core DicConsole.DebugWriteLine("Partitions", "Got {0} partitions", childPartitions.Count); } + // Be sure that device partitions are not excluded if not mapped by any scheme... + if(image.ImageInfo.imageHasPartitions) + { + List startLocations = new List(); + + foreach(Partition detectedPartition in childPartitions) + startLocations.Add(detectedPartition.Start); + + foreach(Partition imagePartition in image.GetPartitions()) + { + if(!startLocations.Contains(imagePartition.Start)) + childPartitions.Add(imagePartition); + } + } + Partition[] childArray = childPartitions.OrderBy(part => part.Start).ThenBy(part => part.Length).ThenBy(part => part.Scheme).ToArray(); for(long i = 0; i < childArray.LongLength; i++) diff --git a/DiscImageChef.Core/Sidecar.cs b/DiscImageChef.Core/Sidecar.cs index dd38b637..9c7440e1 100644 --- a/DiscImageChef.Core/Sidecar.cs +++ b/DiscImageChef.Core/Sidecar.cs @@ -539,10 +539,6 @@ namespace DiscImageChef.Core xmlTrk.FileSystemInformation = new PartitionType[1]; if(partitions.Count > 0) { - partitions.Add(new Partition { - Start = (ulong)xmlTrk.StartSector, - Length = (ulong)((xmlTrk.EndSector - xmlTrk.StartSector) + 1) - }); xmlTrk.FileSystemInformation = new PartitionType[partitions.Count]; for(int i = 0; i < partitions.Count; i++) { diff --git a/DiscImageChef.Filesystems/Fossil.cs b/DiscImageChef.Filesystems/Fossil.cs new file mode 100644 index 00000000..dde9b8d8 --- /dev/null +++ b/DiscImageChef.Filesystems/Fossil.cs @@ -0,0 +1,41 @@ +// /*************************************************************************** +// The Disc Image Chef +// ---------------------------------------------------------------------------- +// +// Filename : Fossil.cs +// Author(s) : Natalia Portillo +// +// Component : Component +// +// --[ Description ] ---------------------------------------------------------- +// +// Description +// +// --[ License ] -------------------------------------------------------------- +// +// This library is free software; you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; either version 2.1 of the +// License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, see . +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2017 Natalia Portillo +// ****************************************************************************/ +using System; +namespace DiscImageChef.Filesystems +{ + public class Fossil + { + public Fossil() + { + } + } +} diff --git a/DiscImageChef.Partitions/Plan9.cs b/DiscImageChef.Partitions/Plan9.cs new file mode 100644 index 00000000..51b6d8ee --- /dev/null +++ b/DiscImageChef.Partitions/Plan9.cs @@ -0,0 +1,41 @@ +// /*************************************************************************** +// The Disc Image Chef +// ---------------------------------------------------------------------------- +// +// Filename : Plan9.cs +// Author(s) : Natalia Portillo +// +// Component : Component +// +// --[ Description ] ---------------------------------------------------------- +// +// Description +// +// --[ License ] -------------------------------------------------------------- +// +// This library is free software; you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; either version 2.1 of the +// License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, see . +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2017 Natalia Portillo +// ****************************************************************************/ +using System; +namespace DiscImageChef.Partitions +{ + public class Plan9 + { + public Plan9() + { + } + } +}