VirtualBox

Changeset 17830 in vbox for trunk/src


Ignore:
Timestamp:
Mar 13, 2009 2:47:55 PM (16 years ago)
Author:
vboxsync
Message:

OVF: report capacity and file size of exported images in XML

File:
1 edited

Legend:

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

    r17829 r17830  
    29642964            }
    29652965
     2966            // we need the following for the XML
     2967            uint64_t cbFile = 0;        // actual file size
     2968            rc = pTargetDisk->GetSize(&cbFile);
     2969            if (FAILED(rc)) throw rc;
     2970
     2971            ULONG64 cbCapacity = 0;     // size reported to guest
     2972            rc = pTargetDisk->GetLogicalSize(&cbCapacity);
     2973            if (FAILED(rc)) throw rc;
     2974            // capacity is reported in megabytes, so...
     2975            cbCapacity *= _1M;
     2976
    29662977            // upon success, close the disk as well
    29672978            rc = pTargetDisk->Close();
    29682979            if (FAILED(rc)) throw rc;
    2969 
    2970             // we need the capacity and actual file size for the XML
    2971             uint64_t cbFile = 12345678; // @todo
    2972             uint64_t cbCapacity = 2345678; // @todo
    29732980
    29742981            // now handle the XML for the disk:
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