VirtualBox

Changeset 6339 in vbox


Ignore:
Timestamp:
Jan 11, 2008 2:24:51 PM (17 years ago)
Author:
vboxsync
Message:

Chop off cylinders above 1024 when deducing geometry from partition table data.

File:
1 edited

Legend:

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

    r6338 r6339  
    298298            cLCHSHeads = iEndHead + 1;
    299299            cLCHSSectors = iEndSector;
    300             cLCHSCylinders = pBlock->pfnGetSize(pBlock) / (512 * cLCHSHeads * cLCHSSectors);
     300            cLCHSCylinders = RT_MIN(1024, pBlock->pfnGetSize(pBlock) / (512 * cLCHSHeads * cLCHSSectors));
    301301            if (cLCHSCylinders >= 1)
    302302            {
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