Do a bit of printf merging.

git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@931 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
Bart Oldeman 2004-05-10 22:46:41 +00:00
parent aea8491528
commit 5dce77cd3b
1 changed files with 13 additions and 10 deletions

View File

@ -355,9 +355,8 @@ void init_LBA_to_CHS(struct CHS *chs, ULONG LBA_address,
void printCHS(char *title, struct CHS *chs) void printCHS(char *title, struct CHS *chs)
{ {
printf("%s", title);
/* has no fixed size for head/sect: is often 1/1 in our context */ /* has no fixed size for head/sect: is often 1/1 in our context */
printf("%4u-%u-%u", chs->Cylinder, chs->Head, chs->Sector); printf("%s%4u-%u-%u", title, chs->Cylinder, chs->Head, chs->Sector);
} }
/* /*
@ -626,21 +625,25 @@ void DosDefinePartition(struct DriveParamS *driveParam,
if (InitKernelConfig.InitDiskShowDriveAssignment) if (InitKernelConfig.InitDiskShowDriveAssignment)
{ {
char *ExtPri;
int num;
LBA_to_CHS(&chs, StartSector, driveParam); LBA_to_CHS(&chs, StartSector, driveParam);
printf("\r%c: HD%d", 'A' + nUnits, (driveParam->driveno & 0x7f) + 1); ExtPri = "Pri";
num = PrimaryNum + 1;
if (extendedPartNo) if (extendedPartNo)
printf(", Ext[%2d]", extendedPartNo); {
else ExtPri = "Ext";
printf(", Pri[%2d]", PrimaryNum + 1); num = extendedPartNo;
}
printf("\r%c: HD%d, %s[%2d]", 'A' + nUnits,
(driveParam->driveno & 0x7f) + 1, ExtPri, num);
printCHS(", CHS= ", &chs); printCHS(", CHS= ", &chs);
printf(", start=%6lu MB, size=%6lu MB", printf(", start=%6lu MB, size=%6lu MB\n",
StartSector / 2048, pEntry->NumSect / 2048); StartSector / 2048, pEntry->NumSect / 2048);
printf("\n");
} }
nUnits++; nUnits++;