mirror of
https://github.com/reactos/reactos.git
synced 2025-01-02 12:32:47 +00:00
- Fixed the start offset of a partition within an extended partition (in xHalIoWritePartitionTable).
svn path=/trunk/; revision=9628
This commit is contained in:
parent
1d623bc9b8
commit
113740ebbd
1 changed files with 11 additions and 3 deletions
|
@ -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 @@ xHalIoWritePartitionTable(IN PDEVICE_OBJECT DeviceObject,
|
|||
((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",
|
||||
|
|
Loading…
Reference in a new issue