X-Git-Url: http://git.jankratochvil.net/?a=blobdiff_plain;f=subsys%2Fsystem%2Fusetup%2Fpartlist.c;h=8969cd3f81a58e7f763a13d9e8a9bb12e11e3678;hb=a4f1ab830f1a18c3a31174cd6974d65119c58189;hp=d00867fcd92c4eafad4cdda8051f850034e56936;hpb=b5f4d0d719d8a92b0c3ab071da83ba0db3a23ad1;p=reactos.git diff --git a/subsys/system/usetup/partlist.c b/subsys/system/usetup/partlist.c index d00867f..8969cd3 100644 --- a/subsys/system/usetup/partlist.c +++ b/subsys/system/usetup/partlist.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* +/* $Id$ * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS text-mode setup * FILE: subsys/system/usetup/partlist.c @@ -34,6 +34,7 @@ #include "usetup.h" #include "console.h" #include "partlist.h" +#include "drivesup.h" /* FUNCTIONS ****************************************************************/ @@ -184,6 +185,10 @@ CreatePartitionList(SHORT Left, List->DiskArray[DiskCount].PartArray[i].PartSize = LayoutBuffer->PartitionEntry[i].PartitionLength.QuadPart; List->DiskArray[DiskCount].PartArray[i].PartNumber = LayoutBuffer->PartitionEntry[i].PartitionNumber, List->DiskArray[DiskCount].PartArray[i].PartType = LayoutBuffer->PartitionEntry[i].PartitionType; + + List->DiskArray[DiskCount].PartArray[i].DriveLetter = GetDriveLetter(DiskCount, + LayoutBuffer->PartitionEntry[i].PartitionNumber); + List->DiskArray[DiskCount].PartArray[i].Used = TRUE; } else @@ -368,15 +373,29 @@ PrintPartitionData(PPARTLIST List, Unit = "kB"; } - sprintf(LineBuffer, - "%d: nr: %d type: %x (%s) %I64u %s", - PartIndex, - PartEntry->PartNumber, - PartEntry->PartType, - PartType, - PartSize, - Unit); - + if (PartEntry->DriveLetter != (CHAR)0) + { + sprintf(LineBuffer, + "%c: %d: nr: %d type: %x (%s) %I64u %s", + PartEntry->DriveLetter, + PartIndex, + PartEntry->PartNumber, + PartEntry->PartType, + PartType, + PartSize, + Unit); + } + else + { + sprintf(LineBuffer, + " %d: nr: %d type: %x (%s) %I64u %s", + PartIndex, + PartEntry->PartNumber, + PartEntry->PartType, + PartType, + PartSize, + Unit); + } Attribute = (List->CurrentDisk == DiskIndex && List->CurrentPartition == PartIndex) ? 0x71 : 0x17; @@ -687,6 +706,8 @@ GetPartitionData(PPARTLIST List, Data->PartNumber = List->DiskArray[List->CurrentDisk].PartArray[List->CurrentPartition].PartNumber; Data->PartType = List->DiskArray[List->CurrentDisk].PartArray[List->CurrentPartition].PartType; + Data->DriveLetter = List->DiskArray[List->CurrentDisk].PartArray[List->CurrentPartition].DriveLetter; + return(TRUE); }