Changeset 48009 in vbox
- Timestamp:
- Aug 23, 2013 7:38:52 AM (11 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/Performance.cpp
r48007 r48009 922 922 int rc = mHAL->getHostDiskSize(mDiskName.c_str(), &total); 923 923 if (RT_SUCCESS(rc)) 924 mTotal->put((ULONG)(total / (1024*1024)));924 mTotal->put((ULONG)(total / _1M)); 925 925 } 926 926 -
trunk/src/VBox/Main/src-server/linux/PerformanceLinux.cpp
r46328 r48009 226 226 { 227 227 struct statvfs stats; 228 const unsigned _MB = 1024 * 1024;229 228 230 229 if (statvfs(path, &stats) == -1) … … 234 233 } 235 234 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); 239 238 240 239 return VINF_SUCCESS; -
trunk/src/VBox/Main/src-server/solaris/PerformanceSolaris.cpp
r47428 r48009 526 526 { 527 527 struct statvfs64 stats; 528 const unsigned _MB = 1024 * 1024;529 528 530 529 if (statvfs64(path, &stats) == -1) … … 534 533 } 535 534 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); 537 536 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); 540 539 541 540 return VINF_SUCCESS; -
trunk/src/VBox/Main/xml/ovfreader.cpp
r47924 r48009 530 530 || (i.strAllocationUnits == "byte * 2^20") // suggested by OVF spec DSP0243 page 21 531 531 ) 532 vsys.ullMemorySize = i.ullVirtualQuantity * 1024 * 1024;532 vsys.ullMemorySize = i.ullVirtualQuantity * _1M; 533 533 else 534 534 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.