Commit in reactos/ntoskrnl/io on MAIN
xhaldrv.c+11-31.44 -> 1.45
- Fixed the start offset of a partition within an extended partition (in xHalIoWritePartitionTable).

reactos/ntoskrnl/io
xhaldrv.c 1.44 -> 1.45
diff -u -r1.44 -r1.45
--- xhaldrv.c	2 May 2004 22:54:45 -0000	1.44
+++ xhaldrv.c	5 Jun 2004 20:05:06 -0000	1.45
@@ -1,4 +1,4 @@
-/* $Id: xhaldrv.c,v 1.44 2004/05/02 22:54:45 hbirr Exp $
+/* $Id: xhaldrv.c,v 1.45 2004/06/05 20:05:06 hbirr Exp $
  *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS kernel
@@ -1356,8 +1356,16 @@
 			((EndCylinder & 0x0300) >> 2) + (EndSector & 0x3f);
 
 		      /* Calculate start sector and sector count */
-		      StartBlock =
-			(PartitionBuffer->PartitionEntry[i + j].StartingOffset.QuadPart - ContainerOffset) / SectorSize;
+		      if (IsContainerPartition (PartitionBuffer->PartitionEntry[i + j].PartitionType))
+		        {
+		          StartBlock =
+			    (PartitionBuffer->PartitionEntry[i + j].StartingOffset.QuadPart - ContainerOffset) / SectorSize;
+			}
+		      else
+		        {
+		          StartBlock =
+			    (PartitionBuffer->PartitionEntry[i + j].StartingOffset.QuadPart - NextPartitionOffset) / SectorSize;
+		        }
 		      SectorCount =
 			PartitionBuffer->PartitionEntry[i + j].PartitionLength.QuadPart / SectorSize;
 		      DPRINT ("LBA (StartBlock:%lu  SectorCount:%lu)\n",
CVSspam 0.2.8