VirtualBox

Ignore:
Timestamp:
Sep 15, 2010 5:04:48 PM (14 years ago)
Author:
vboxsync
Message:

Main/Medium+MediumFormat+GuestOSType+SystemPropertiesImpl+Console+Global: consistently use bytes as size units, forgotten const value in API, MaxVDISize method renamed to InfoVDSize, STDMETHOD macro usage fixes, whitespace cleanup

Frontends/VirtualBox+VBoxManage+VBoxShell: adapt to changed disk size units

Main/StorageControllerImpl: check the storage controller instance limit to avoid creating unusable VM configs, simplify unnecessarily complex code for querying the controller properties

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/MediumImpl.cpp

    r32437 r32531  
    134134    MediumType_T type;
    135135    DeviceType_T devType;
    136     uint64_t logicalSize;   /*< In MBytes. */
     136    uint64_t logicalSize;
    137137
    138138    HDDOpenMode hddOpenMode;
     
    38743874
    38753875            mediumSize = VDGetFileSize(hdd, 0);
    3876             mediumLogicalSize = VDGetSize(hdd, 0) / _1M;
     3876            mediumLogicalSize = VDGetSize(hdd, 0);
    38773877
    38783878            success = true;
     
    56145614                               format.c_str(),
    56155615                               location.c_str(),
    5616                                task.mSize * _1M,
     5616                               task.mSize,
    56175617                               task.mVariant,
    56185618                               NULL,
     
    56295629
    56305630            size = VDGetFileSize(hdd, 0);
    5631             logicalSize = VDGetSize(hdd, 0) / _1M;
     5631            logicalSize = VDGetSize(hdd, 0);
    56325632            unsigned uImageFlags;
    56335633            vrc = VDGetImageFlags(hdd, 0, &uImageFlags);
     
    57975797
    57985798            size = VDGetFileSize(hdd, VD_LAST_IMAGE);
    5799             logicalSize = VDGetSize(hdd, VD_LAST_IMAGE) / _1M;
     5799            logicalSize = VDGetSize(hdd, VD_LAST_IMAGE);
    58005800            unsigned uImageFlags;
    58015801            vrc = VDGetImageFlags(hdd, 0, &uImageFlags);
     
    63446344
    63456345                size = VDGetFileSize(targetHdd, VD_LAST_IMAGE);
    6346                 logicalSize = VDGetSize(targetHdd, VD_LAST_IMAGE) / _1M;
     6346                logicalSize = VDGetSize(targetHdd, VD_LAST_IMAGE);
    63476347                unsigned uImageFlags;
    63486348                vrc = VDGetImageFlags(targetHdd, 0, &uImageFlags);
     
    66146614
    66156615            size = VDGetFileSize(hdd, VD_LAST_IMAGE);
    6616             logicalSize = VDGetSize(hdd, VD_LAST_IMAGE) / _1M;
     6616            logicalSize = VDGetSize(hdd, VD_LAST_IMAGE);
    66176617            unsigned uImageFlags;
    66186618            vrc = VDGetImageFlags(hdd, 0, &uImageFlags);
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