VirtualBox

Changeset 3930 in vbox


Ignore:
Timestamp:
Jul 31, 2007 7:36:53 AM (17 years ago)
Author:
vboxsync
Message:

Another attempt at fixing geometry problems with VMDK files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/PC/DevPcBios.cpp

    r3721 r3930  
    303303        if (VBOX_SUCCESS(rc))
    304304        {
     305            PDMBIOSTRANSLATION enmTranslation;
     306            rc = pBlockBios->pfnGetTranslation(pBlockBios, &enmTranslation);
     307            if (    VBOX_SUCCESS(rc) && enmTranslation == PDMBIOSTRANSLATION_LBA
     308                &&  cCylinders >= 1024 && cSectors == 63 && (cHeads == 16 || cHeads == 32 || cHeads == 64 || cHeads == 128 || cHeads == 255))
     309            {
     310                uint32_t cTotalSectors = cCylinders * cHeads * cSectors;
     311                cHeads = 16;
     312                cCylinders = cTotalSectors / 16 / 63;
     313            }
    305314            Log2(("pcbiosCmosInitHardDisk: offInfo=%#x: CHS=%d/%d/%d\n", offInfo, cCylinders, cHeads, cSectors));
    306315            pcbiosCmosWrite(pDevIns, offType, 47);                              /* 19h - First Extended Hard Disk Drive Type */
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette