Author: ekohl
Date: Thu May 12 15:30:49 2016
New Revision: 71320
URL:
http://svn.reactos.org/svn/reactos?rev=71320&view=rev
Log:
[USETUP]
Debug output in usetup.
Patch by Wim Hueskes.
CORE-11230 #resolve #comment Thanks a lot!
Modified:
trunk/reactos/base/setup/usetup/interface/usetup.c
trunk/reactos/base/setup/usetup/partlist.c
Modified: trunk/reactos/base/setup/usetup/interface/usetup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/interfac…
==============================================================================
--- trunk/reactos/base/setup/usetup/interface/usetup.c [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/interface/usetup.c [iso-8859-1] Thu May 12 15:30:49
2016
@@ -2878,7 +2878,7 @@
#ifndef NDEBUG
ULONG Line;
ULONG i;
- PLIST_ENTRY Entry;
+ PPARTITION_INFORMATION PartitionInfo;
#endif
DPRINT("FormatPartitionPage()\n");
@@ -2988,38 +2988,29 @@
#ifndef NDEBUG
CONSOLE_PrintTextXY(6, 12,
- "Disk: %I64u Cylinder: %I64u Track: %I64u",
- DiskEntry->DiskSize,
- DiskEntry->CylinderSize,
- DiskEntry->TrackSize);
+ "Cylinders: %I64u Tracks/Cyl: %lu Sectors/Trk: %lu
Bytes/Sec: %lu %c",
+ DiskEntry->Cylinders,
+ DiskEntry->TracksPerCylinder,
+ DiskEntry->SectorsPerTrack,
+ DiskEntry->BytesPerSector,
+ DiskEntry->Dirty ? '*' : ' ');
Line = 13;
- DiskEntry = PartitionList->TempDisk;
- Entry = DiskEntry->PartListHead.Flink;
-
- while (Entry != &DiskEntry->PrimaryPartListHead)
- {
- PartEntry = CONTAINING_RECORD(Entry, PARTENTRY, ListEntry);
-
- if (PartEntry->IsPartitioned == TRUE)
- {
- CONSOLE_PrintTextXY(6, Line,
- "%2u: %2u %c %12I64u %12I64u %2u
%c",
- i,
- PartEntry->PartitionNumber,
- PartEntry->BootIndicator ? 'A' :
'-',
- PartEntry->StartSector.QuadPart,
- PartEntry->SectorCount.QuadPart,
- PartEntry->PartitionType,
- PartEntry->Dirty ? '*' : '
');
- Line++;
- }
-
- Entry = Entry->Flink;
- }
-
- /* Restore the old entry */
- PartEntry = PartitionList->TempPartition;
+
+ for (i = 0; i < DiskEntry->LayoutBuffer->PartitionCount; i++)
+ {
+ PartitionInfo = &DiskEntry->LayoutBuffer->PartitionEntry[i];
+
+ CONSOLE_PrintTextXY(6, Line,
+ "%2u: %2lu %c %12I64u %12I64u %02x",
+ i,
+ PartitionInfo->PartitionNumber,
+ PartitionInfo->BootIndicator ? 'A' :
'-',
+ PartitionInfo->StartingOffset.QuadPart /
DiskEntry->BytesPerSector,
+ PartitionInfo->PartitionLength.QuadPart /
DiskEntry->BytesPerSector,
+ PartitionInfo->PartitionType);
+ Line++;
+ }
#endif
if (WritePartitionsToDisk(PartitionList) == FALSE)
Modified: trunk/reactos/base/setup/usetup/partlist.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/partlist…
==============================================================================
--- trunk/reactos/base/setup/usetup/partlist.c [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/partlist.c [iso-8859-1] Thu May 12 15:30:49 2016
@@ -291,7 +291,7 @@
NULL);
swprintf(KeyName,
- L"\\Scsi\\Scsi Port %lu",
+ L"\\Scsi\\Scsi Port %hu",
DiskEntry->Port);
RtlZeroMemory(&QueryTable,
@@ -1267,9 +1267,9 @@
DiskEntry->BytesPerSector = DiskGeometry.BytesPerSector;
DPRINT("Cylinders %I64u\n", DiskEntry->Cylinders);
- DPRINT("TracksPerCylinder %I64u\n", DiskEntry->TracksPerCylinder);
- DPRINT("SectorsPerTrack %I64u\n", DiskEntry->SectorsPerTrack);
- DPRINT("BytesPerSector %I64u\n", DiskEntry->BytesPerSector);
+ DPRINT("TracksPerCylinder %lu\n", DiskEntry->TracksPerCylinder);
+ DPRINT("SectorsPerTrack %lu\n", DiskEntry->SectorsPerTrack);
+ DPRINT("BytesPerSector %lu\n", DiskEntry->BytesPerSector);
DiskEntry->SectorCount.QuadPart = DiskGeometry.Cylinders.QuadPart *
(ULONGLONG)DiskGeometry.TracksPerCylinder *
@@ -1279,7 +1279,7 @@
DiskEntry->CylinderAlignment = DiskGeometry.TracksPerCylinder *
DiskGeometry.SectorsPerTrack;
- DPRINT("SectorCount %I64u\n", DiskEntry->SectorCount);
+ DPRINT("SectorCount %I64u\n", DiskEntry->SectorCount.QuadPart);
DPRINT("SectorAlignment %lu\n", DiskEntry->SectorAlignment);
DiskEntry->DiskNumber = DiskNumber;