VirtualBox

Ignore:
Timestamp:
Oct 24, 2008 11:52:46 AM (16 years ago)
Author:
vboxsync
Message:

Frontends/VBoxManage: fix division by zero in machine readable showvminfo.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp

    r13221 r13550  
    22202220            if (details == VMINFO_MACHINEREADABLE)
    22212221            {
     2222                uint64_t ThroughputSend = 0;
     2223                uint64_t ThroughputReceive = 0;
     2224                if (EndTime != BeginTime)
     2225                {
     2226                    ThroughputSend = (BytesSent * 1000) / (EndTime - BeginTime);
     2227                    ThroughputReceive = (BytesReceived * 1000) / (EndTime - BeginTime);
     2228                }
    22222229                RTPrintf("VRDPBytesSent=%llu\n", BytesSent);
    2223                 RTPrintf("VRDPThroughputSend=%llu\n", (BytesSent * 1000) / (EndTime - BeginTime) );
     2230                RTPrintf("VRDPThroughputSend=%llu\n", ThroughputSend);
    22242231                RTPrintf("VRDPBytesSentTotal=%llu\n", BytesSentTotal);
    22252232
    22262233                RTPrintf("VRDPBytesReceived=%llu\n", BytesReceived);
    2227                 RTPrintf("VRDPThroughputReceive=%llu\n", (BytesReceived * 1000) / (EndTime - BeginTime) );
     2234                RTPrintf("VRDPThroughputReceive=%llu\n", ThroughputReceive);
    22282235                RTPrintf("VRDPBytesReceivedTotal=%llu\n", BytesReceivedTotal);
    22292236            }
     
    79357942        listAffectedMetrics(aVirtualBox,
    79367943                            ComSafeArrayAsInParam(affectedMetrics));
    7937    
     7944
    79387945    return 0;
    79397946}
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