- xHalIoReadPartitionTable() returns proper HiddenSector values.

- Disabled some debug messgages.

svn path=/trunk/; revision=5832
This commit is contained in:
Eric Kohl 2003-08-24 18:07:45 +00:00
parent e4259d3298
commit 096203e6dc

View file

@ -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,7 +1271,7 @@ 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 */
@ -1280,7 +1281,7 @@ 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 */
@ -1300,7 +1301,7 @@ 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 */