VirtualBox

Changeset 99604 in vbox for trunk/src/VBox/Main/xml


Ignore:
Timestamp:
May 4, 2023 1:53:06 PM (21 months ago)
Author:
vboxsync
Message:

bugref:10314. bugref:10278. Reverted VSD RAM unit to bytes and fixed other places where MB unit was used.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/xml/ovfreader.cpp

    r99523 r99604  
    521521
    522522                    case ResourceType_Memory:        // 4
     523                        /* It's alway stored in bytes in VSD according to the old internal agreement within the team */
    523524                        if (    i.strAllocationUnits == "MegaBytes"           // found in OVF created by OVF toolkit
    524525                             || i.strAllocationUnits == "MB"                  // found in MS docs
    525526                             || i.strAllocationUnits == "byte * 2^20"         // suggested by OVF spec DSP0243 page 21
    526527                           )
    527                             vsys.ullMemorySize = i.ullVirtualQuantity;
     528                            vsys.ullMemorySize = i.ullVirtualQuantity * _1M;
    528529                        else if ( i.strAllocationUnits == "GigaBytes"
    529530                                  || i.strAllocationUnits == "GB"
    530531                                  || i.strAllocationUnits == "byte * 2^30"
    531532                           )
    532                             vsys.ullMemorySize = i.ullVirtualQuantity/_1K;//back to MB
     533                            vsys.ullMemorySize = i.ullVirtualQuantity * _1G;
    533534                        else
    534535                            throw OVFLogicError(N_("Error reading \"%s\": Invalid allocation unit \"%s\" specified with memory size item, line %d"),
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