Debug output in usetup.
Patch by Wim Hueskes.
CORE-11230 #resolve #comment Thanks a lot!

svn path=/trunk/; revision=71320
This commit is contained in:
Eric Kohl 2016-05-12 15:30:49 +00:00
parent beacbdfc3b
commit ade016e3a4
2 changed files with 23 additions and 32 deletions

View file

@ -2878,7 +2878,7 @@ FormatPartitionPage(PINPUT_RECORD Ir)
#ifndef NDEBUG #ifndef NDEBUG
ULONG Line; ULONG Line;
ULONG i; ULONG i;
PLIST_ENTRY Entry; PPARTITION_INFORMATION PartitionInfo;
#endif #endif
DPRINT("FormatPartitionPage()\n"); DPRINT("FormatPartitionPage()\n");
@ -2988,38 +2988,29 @@ FormatPartitionPage(PINPUT_RECORD Ir)
#ifndef NDEBUG #ifndef NDEBUG
CONSOLE_PrintTextXY(6, 12, CONSOLE_PrintTextXY(6, 12,
"Disk: %I64u Cylinder: %I64u Track: %I64u", "Cylinders: %I64u Tracks/Cyl: %lu Sectors/Trk: %lu Bytes/Sec: %lu %c",
DiskEntry->DiskSize, DiskEntry->Cylinders,
DiskEntry->CylinderSize, DiskEntry->TracksPerCylinder,
DiskEntry->TrackSize); DiskEntry->SectorsPerTrack,
DiskEntry->BytesPerSector,
DiskEntry->Dirty ? '*' : ' ');
Line = 13; Line = 13;
DiskEntry = PartitionList->TempDisk;
Entry = DiskEntry->PartListHead.Flink;
while (Entry != &DiskEntry->PrimaryPartListHead) for (i = 0; i < DiskEntry->LayoutBuffer->PartitionCount; i++)
{ {
PartEntry = CONTAINING_RECORD(Entry, PARTENTRY, ListEntry); PartitionInfo = &DiskEntry->LayoutBuffer->PartitionEntry[i];
if (PartEntry->IsPartitioned == TRUE) CONSOLE_PrintTextXY(6, Line,
{ "%2u: %2lu %c %12I64u %12I64u %02x",
CONSOLE_PrintTextXY(6, Line, i,
"%2u: %2u %c %12I64u %12I64u %2u %c", PartitionInfo->PartitionNumber,
i, PartitionInfo->BootIndicator ? 'A' : '-',
PartEntry->PartitionNumber, PartitionInfo->StartingOffset.QuadPart / DiskEntry->BytesPerSector,
PartEntry->BootIndicator ? 'A' : '-', PartitionInfo->PartitionLength.QuadPart / DiskEntry->BytesPerSector,
PartEntry->StartSector.QuadPart, PartitionInfo->PartitionType);
PartEntry->SectorCount.QuadPart, Line++;
PartEntry->PartitionType,
PartEntry->Dirty ? '*' : ' ');
Line++;
}
Entry = Entry->Flink;
} }
/* Restore the old entry */
PartEntry = PartitionList->TempPartition;
#endif #endif
if (WritePartitionsToDisk(PartitionList) == FALSE) if (WritePartitionsToDisk(PartitionList) == FALSE)

View file

@ -291,7 +291,7 @@ GetDriverName(
NULL); NULL);
swprintf(KeyName, swprintf(KeyName,
L"\\Scsi\\Scsi Port %lu", L"\\Scsi\\Scsi Port %hu",
DiskEntry->Port); DiskEntry->Port);
RtlZeroMemory(&QueryTable, RtlZeroMemory(&QueryTable,
@ -1267,9 +1267,9 @@ AddDiskToList(
DiskEntry->BytesPerSector = DiskGeometry.BytesPerSector; DiskEntry->BytesPerSector = DiskGeometry.BytesPerSector;
DPRINT("Cylinders %I64u\n", DiskEntry->Cylinders); DPRINT("Cylinders %I64u\n", DiskEntry->Cylinders);
DPRINT("TracksPerCylinder %I64u\n", DiskEntry->TracksPerCylinder); DPRINT("TracksPerCylinder %lu\n", DiskEntry->TracksPerCylinder);
DPRINT("SectorsPerTrack %I64u\n", DiskEntry->SectorsPerTrack); DPRINT("SectorsPerTrack %lu\n", DiskEntry->SectorsPerTrack);
DPRINT("BytesPerSector %I64u\n", DiskEntry->BytesPerSector); DPRINT("BytesPerSector %lu\n", DiskEntry->BytesPerSector);
DiskEntry->SectorCount.QuadPart = DiskGeometry.Cylinders.QuadPart * DiskEntry->SectorCount.QuadPart = DiskGeometry.Cylinders.QuadPart *
(ULONGLONG)DiskGeometry.TracksPerCylinder * (ULONGLONG)DiskGeometry.TracksPerCylinder *
@ -1279,7 +1279,7 @@ AddDiskToList(
DiskEntry->CylinderAlignment = DiskGeometry.TracksPerCylinder * DiskEntry->CylinderAlignment = DiskGeometry.TracksPerCylinder *
DiskGeometry.SectorsPerTrack; DiskGeometry.SectorsPerTrack;
DPRINT("SectorCount %I64u\n", DiskEntry->SectorCount); DPRINT("SectorCount %I64u\n", DiskEntry->SectorCount.QuadPart);
DPRINT("SectorAlignment %lu\n", DiskEntry->SectorAlignment); DPRINT("SectorAlignment %lu\n", DiskEntry->SectorAlignment);
DiskEntry->DiskNumber = DiskNumber; DiskEntry->DiskNumber = DiskNumber;