mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 03:05:40 +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
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -873,7 +873,8 @@ xHalIoReadPartitionTable(PDEVICE_OBJECT DeviceObject,
|
|||
}
|
||||
LayoutBuffer->PartitionEntry[Count].PartitionLength.QuadPart =
|
||||
(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))
|
||||
{
|
||||
|
@ -1209,7 +1210,7 @@ xHalIoWritePartitionTable(IN PDEVICE_OBJECT DeviceObject,
|
|||
PartitionSector);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT1 ("xHalpReadSector2() failed (Status %lx)\n", Status);
|
||||
DPRINT1 ("xHalpReadSector() failed (Status %lx)\n", Status);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1270,7 +1271,7 @@ xHalIoWritePartitionTable(IN PDEVICE_OBJECT DeviceObject,
|
|||
StartCylinder = (x / NumberOfHeads) %1024;
|
||||
StartHead = x % NumberOfHeads;
|
||||
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);
|
||||
|
||||
/* Compute ending CHS values */
|
||||
|
@ -1280,7 +1281,7 @@ xHalIoWritePartitionTable(IN PDEVICE_OBJECT DeviceObject,
|
|||
EndCylinder = (x / NumberOfHeads) % 1024;
|
||||
EndHead = x % NumberOfHeads;
|
||||
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);
|
||||
|
||||
/* Set starting CHS values */
|
||||
|
@ -1300,7 +1301,7 @@ xHalIoWritePartitionTable(IN PDEVICE_OBJECT DeviceObject,
|
|||
(PartitionBuffer->PartitionEntry[i + j].StartingOffset.QuadPart - ContainerOffset) / SectorSize;
|
||||
SectorCount =
|
||||
PartitionBuffer->PartitionEntry[i + j].PartitionLength.QuadPart / SectorSize;
|
||||
DPRINT1 ("LBA (StartBlock:%lu SectorCount:%lu)\n",
|
||||
DPRINT ("LBA (StartBlock:%lu SectorCount:%lu)\n",
|
||||
StartBlock, SectorCount);
|
||||
|
||||
/* Set start sector and sector count */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue