VirtualBox

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

1024 * 1024 => _1M

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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;
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