VirtualBox

Changeset 48009 in vbox


Ignore:
Timestamp:
Aug 23, 2013 7:38:52 AM (11 years ago)
Author:
vboxsync
Message:

1024 * 1024 => _1M

Location:
trunk/src/VBox/Main
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/Performance.cpp

    r48007 r48009  
    922922    int rc = mHAL->getHostDiskSize(mDiskName.c_str(), &total);
    923923    if (RT_SUCCESS(rc))
    924         mTotal->put((ULONG)(total / (1024*1024)));
     924        mTotal->put((ULONG)(total / _1M));
    925925}
    926926
  • trunk/src/VBox/Main/src-server/linux/PerformanceLinux.cpp

    r46328 r48009  
    226226{
    227227    struct statvfs stats;
    228     const unsigned _MB = 1024 * 1024;
    229228
    230229    if (statvfs(path, &stats) == -1)
     
    234233    }
    235234    uint64_t cbBlock = stats.f_frsize ? stats.f_frsize : stats.f_bsize;
    236     *total = (ULONG)(cbBlock * stats.f_blocks / _MB);
    237     *used  = (ULONG)(cbBlock * (stats.f_blocks - stats.f_bfree) / _MB);
    238     *available = (ULONG)(cbBlock * stats.f_bavail / _MB);
     235    *total = (ULONG)(cbBlock * stats.f_blocks / _1M);
     236    *used  = (ULONG)(cbBlock * (stats.f_blocks - stats.f_bfree) / _1M);
     237    *available = (ULONG)(cbBlock * stats.f_bavail / _1M);
    239238
    240239    return VINF_SUCCESS;
  • trunk/src/VBox/Main/src-server/solaris/PerformanceSolaris.cpp

    r47428 r48009  
    526526{
    527527    struct statvfs64 stats;
    528     const unsigned _MB = 1024 * 1024;
    529528
    530529    if (statvfs64(path, &stats) == -1)
     
    534533    }
    535534    uint64_t cbBlock = stats.f_frsize ? stats.f_frsize : stats.f_bsize;
    536     *total = (ULONG)(getZfsTotal(cbBlock * stats.f_blocks, stats.f_basetype, path) / _MB);
     535    *total = (ULONG)(getZfsTotal(cbBlock * stats.f_blocks, stats.f_basetype, path) / _1M);
    537536    LogFlowThisFunc(("f_blocks=%llu.\n", stats.f_blocks));
    538     *used  = (ULONG)(cbBlock * (stats.f_blocks - stats.f_bfree) / _MB);
    539     *available = (ULONG)(cbBlock * stats.f_bavail / _MB);
     537    *used  = (ULONG)(cbBlock * (stats.f_blocks - stats.f_bfree) / _1M);
     538    *available = (ULONG)(cbBlock * stats.f_bavail / _1M);
    540539
    541540    return VINF_SUCCESS;
  • trunk/src/VBox/Main/xml/ovfreader.cpp

    r47924 r48009  
    530530                             || (i.strAllocationUnits == "byte * 2^20")         // suggested by OVF spec DSP0243 page 21
    531531                           )
    532                             vsys.ullMemorySize = i.ullVirtualQuantity * 1024 * 1024;
     532                            vsys.ullMemorySize = i.ullVirtualQuantity * _1M;
    533533                        else
    534534                            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