From e3cdf500f8cb26f0aa69d7ad05078341dd103265 Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Wed, 26 Jul 2017 04:16:45 +0100 Subject: [PATCH] Corrected partition arithmetics. --- DiscImageChef.Partitions/DragonFlyBSD.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/DiscImageChef.Partitions/DragonFlyBSD.cs b/DiscImageChef.Partitions/DragonFlyBSD.cs index 0ac7b40d..a44d5345 100644 --- a/DiscImageChef.Partitions/DragonFlyBSD.cs +++ b/DiscImageChef.Partitions/DragonFlyBSD.cs @@ -75,14 +75,18 @@ namespace DiscImageChef.PartPlugins { Partition part = new Partition { - Start = entry.p_boffset, - Offset = entry.p_boffset, + Start = (entry.p_boffset / imagePlugin.GetSectorSize()) + sectorOffset, + Offset = entry.p_boffset + (sectorOffset * imagePlugin.GetSectorSize()), Size = entry.p_bsize, - Length = entry.p_bsize, + Length = (entry.p_bsize / imagePlugin.GetSectorSize()), Name = entry.p_stor_uuid.ToString(), Sequence = counter, Scheme = Name }; + + if((entry.p_bsize % imagePlugin.GetSectorSize()) > 0) + part.Length++; + if((BSD.fsType)entry.p_fstype == BSD.fsType.Other) part.Type = entry.p_type_uuid.ToString(); else