VirtualBox

Changeset 18557 in vbox


Ignore:
Timestamp:
Mar 30, 2009 5:42:47 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
45432
Message:

Storage/VBoxHDD: drop 1024 cylinder LCHS paranoia. SCSI controllers have larger values, and this caused unnecessary trouble when converting images. The clipping is already done in DevPcBios.

Location:
trunk/src/VBox/Devices
Files:
2 edited

Legend:

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

    r18373 r18557  
    410410    if (   rc == VERR_PDM_GEOMETRY_NOT_SET
    411411        || LCHSGeometry.cCylinders == 0
    412         || LCHSGeometry.cCylinders > 1024
    413412        || LCHSGeometry.cHeads == 0
    414413        || LCHSGeometry.cHeads > 255
  • trunk/src/VBox/Devices/Storage/VBoxHDD.cpp

    r18150 r18557  
    11241124        {
    11251125            /* Make sure the LCHS geometry is properly clipped. */
    1126             pDisk->LCHSGeometry.cCylinders = RT_MIN(pDisk->LCHSGeometry.cCylinders, 1024);
    11271126            pDisk->LCHSGeometry.cHeads = RT_MIN(pDisk->LCHSGeometry.cHeads, 255);
    11281127            pDisk->LCHSGeometry.cSectors = RT_MIN(pDisk->LCHSGeometry.cSectors, 63);
     
    11831182 * @param   pszComment      Pointer to image comment. NULL is ok.
    11841183 * @param   pPCHSGeometry   Pointer to physical disk geometry <= (16383,16,63). Not NULL.
    1185  * @param   pLCHSGeometry   Pointer to logical disk geometry <= (1024,255,63). Not NULL.
     1184 * @param   pLCHSGeometry   Pointer to logical disk geometry <= (x,255,63). Not NULL.
    11861185 * @param   pUuid           New UUID of the image. If NULL, a new UUID is created.
    11871186 * @param   uOpenFlags      Image file open mode, see VD_OPEN_FLAGS_* constants.
     
    12461245        /* The LCHS geometry fields may be 0 to leave it to later autodetection. */
    12471246        AssertMsgBreakStmt(   VALID_PTR(pLCHSGeometry)
    1248                            && pLCHSGeometry->cCylinders <= 1024
    12491247                           && pLCHSGeometry->cHeads <= 255
    12501248                           && pLCHSGeometry->cSectors <= 63,
     
    13621360            {
    13631361                /* Make sure the CHS geometry is properly clipped. */
    1364                 pDisk->LCHSGeometry.cCylinders = RT_MIN(pDisk->LCHSGeometry.cCylinders, 1024);
    13651362                pDisk->LCHSGeometry.cHeads = RT_MIN(pDisk->LCHSGeometry.cHeads, 255);
    13661363                pDisk->LCHSGeometry.cSectors = RT_MIN(pDisk->LCHSGeometry.cSectors, 63);
     
    21972194        {
    21982195            /* Make sure the LCHS geometry is properly clipped. */
    2199             pDisk->LCHSGeometry.cCylinders = RT_MIN(pDisk->LCHSGeometry.cCylinders, 1024);
    22002196            pDisk->LCHSGeometry.cHeads = RT_MIN(pDisk->LCHSGeometry.cHeads, 255);
    22012197            pDisk->LCHSGeometry.cSectors = RT_MIN(pDisk->LCHSGeometry.cSectors, 63);
     
    25922588                {
    25932589                    /* Make sure the CHS geometry is properly clipped. */
    2594                     pDisk->PCHSGeometry.cCylinders = RT_MIN(pDisk->PCHSGeometry.cCylinders, 1024);
    25952590                    pDisk->PCHSGeometry.cHeads = RT_MIN(pDisk->PCHSGeometry.cHeads, 255);
    25962591                    pDisk->PCHSGeometry.cSectors = RT_MIN(pDisk->PCHSGeometry.cSectors, 63);
     
    27012696        /* Check arguments. */
    27022697        AssertMsgBreakStmt(   VALID_PTR(pLCHSGeometry)
    2703                            && pLCHSGeometry->cCylinders <= 1024
    27042698                           && pLCHSGeometry->cHeads <= 255
    27052699                           && pLCHSGeometry->cSectors <= 63,
     
    27382732                {
    27392733                    /* Make sure the CHS geometry is properly clipped. */
    2740                     pDisk->LCHSGeometry.cCylinders = RT_MIN(pDisk->LCHSGeometry.cCylinders, 1024);
    27412734                    pDisk->LCHSGeometry.cHeads = RT_MIN(pDisk->LCHSGeometry.cHeads, 255);
    27422735                    pDisk->LCHSGeometry.cSectors = RT_MIN(pDisk->LCHSGeometry.cSectors, 63);
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