mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 17:05:45 +00:00
- xHalIoReadPartitionTable() returns proper HiddenSector values.
- Disabled some debug messgages. svn path=/trunk/; revision=5832
This commit is contained in:
parent
e4259d3298
commit
096203e6dc
1 changed files with 10 additions and 9 deletions
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: xhaldrv.c,v 1.38 2003/08/18 17:34:18 ekohl Exp $
|
/* $Id: xhaldrv.c,v 1.39 2003/08/24 18:07:45 ekohl Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -873,7 +873,8 @@ xHalIoReadPartitionTable(PDEVICE_OBJECT DeviceObject,
|
||||||
}
|
}
|
||||||
LayoutBuffer->PartitionEntry[Count].PartitionLength.QuadPart =
|
LayoutBuffer->PartitionEntry[Count].PartitionLength.QuadPart =
|
||||||
(ULONGLONG)PartitionSector->Partition[i].SectorCount * (ULONGLONG)SectorSize;
|
(ULONGLONG)PartitionSector->Partition[i].SectorCount * (ULONGLONG)SectorSize;
|
||||||
LayoutBuffer->PartitionEntry[Count].HiddenSectors = 0;
|
LayoutBuffer->PartitionEntry[Count].HiddenSectors =
|
||||||
|
PartitionSector->Partition[i].StartingBlock;
|
||||||
|
|
||||||
if (IsRecognizedPartition(PartitionSector->Partition[i].PartitionType))
|
if (IsRecognizedPartition(PartitionSector->Partition[i].PartitionType))
|
||||||
{
|
{
|
||||||
|
@ -1209,7 +1210,7 @@ xHalIoWritePartitionTable(IN PDEVICE_OBJECT DeviceObject,
|
||||||
PartitionSector);
|
PartitionSector);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT1 ("xHalpReadSector2() failed (Status %lx)\n", Status);
|
DPRINT1 ("xHalpReadSector() failed (Status %lx)\n", Status);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1270,8 +1271,8 @@ xHalIoWritePartitionTable(IN PDEVICE_OBJECT DeviceObject,
|
||||||
StartCylinder = (x / NumberOfHeads) %1024;
|
StartCylinder = (x / NumberOfHeads) %1024;
|
||||||
StartHead = x % NumberOfHeads;
|
StartHead = x % NumberOfHeads;
|
||||||
StartSector = (lba % SectorsPerTrack) + 1;
|
StartSector = (lba % SectorsPerTrack) + 1;
|
||||||
DPRINT1 ("StartingOffset (LBA:%d C:%d H:%d S:%d)\n",
|
DPRINT ("StartingOffset (LBA:%d C:%d H:%d S:%d)\n",
|
||||||
lba, StartCylinder, StartHead, StartSector);
|
lba, StartCylinder, StartHead, StartSector);
|
||||||
|
|
||||||
/* Compute ending CHS values */
|
/* Compute ending CHS values */
|
||||||
lba = (PartitionBuffer->PartitionEntry[i + j].StartingOffset.QuadPart +
|
lba = (PartitionBuffer->PartitionEntry[i + j].StartingOffset.QuadPart +
|
||||||
|
@ -1280,8 +1281,8 @@ xHalIoWritePartitionTable(IN PDEVICE_OBJECT DeviceObject,
|
||||||
EndCylinder = (x / NumberOfHeads) % 1024;
|
EndCylinder = (x / NumberOfHeads) % 1024;
|
||||||
EndHead = x % NumberOfHeads;
|
EndHead = x % NumberOfHeads;
|
||||||
EndSector = (lba % SectorsPerTrack) + 1;
|
EndSector = (lba % SectorsPerTrack) + 1;
|
||||||
DPRINT1 ("EndingOffset (LBA:%d C:%d H:%d S:%d)\n",
|
DPRINT ("EndingOffset (LBA:%d C:%d H:%d S:%d)\n",
|
||||||
lba, EndCylinder, EndHead, EndSector);
|
lba, EndCylinder, EndHead, EndSector);
|
||||||
|
|
||||||
/* Set starting CHS values */
|
/* Set starting CHS values */
|
||||||
PartitionSector->Partition[j].StartingCylinder = StartCylinder & 0xff;
|
PartitionSector->Partition[j].StartingCylinder = StartCylinder & 0xff;
|
||||||
|
@ -1300,8 +1301,8 @@ xHalIoWritePartitionTable(IN PDEVICE_OBJECT DeviceObject,
|
||||||
(PartitionBuffer->PartitionEntry[i + j].StartingOffset.QuadPart - ContainerOffset) / SectorSize;
|
(PartitionBuffer->PartitionEntry[i + j].StartingOffset.QuadPart - ContainerOffset) / SectorSize;
|
||||||
SectorCount =
|
SectorCount =
|
||||||
PartitionBuffer->PartitionEntry[i + j].PartitionLength.QuadPart / SectorSize;
|
PartitionBuffer->PartitionEntry[i + j].PartitionLength.QuadPart / SectorSize;
|
||||||
DPRINT1 ("LBA (StartBlock:%lu SectorCount:%lu)\n",
|
DPRINT ("LBA (StartBlock:%lu SectorCount:%lu)\n",
|
||||||
StartBlock, SectorCount);
|
StartBlock, SectorCount);
|
||||||
|
|
||||||
/* Set start sector and sector count */
|
/* Set start sector and sector count */
|
||||||
PartitionSector->Partition[j].StartingBlock = StartBlock;
|
PartitionSector->Partition[j].StartingBlock = StartBlock;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue