VirtualBox

Changeset 43933 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Nov 22, 2012 7:43:47 AM (12 years ago)
Author:
vboxsync
Message:

Main/Metrics: Host link speed metric and the fix for base name extraction in VBoxManage (#6345)

File:
1 edited

Legend:

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

    r43629 r43933  
    104104{
    105105    char *pszRaw = aFullName.mutableRaw();
    106     char *pszSlash = strrchr(pszRaw, '/');
    107     if (pszSlash)
    108     {
    109         *pszSlash = 0;
    110         aFullName.jolt();
     106    /*
     107     * Currently there are two metrics which base name is the same as the
     108     * sub-metric name: CPU/MHz and Net/<iface>/LinkSpeed.
     109     */
     110    if (strcmp(pszRaw, "CPU/MHz") && !RTStrSimplePatternMatch("Net/*/LinkSpeed", pszRaw))
     111    {
     112        char *pszSlash = strrchr(pszRaw, '/');
     113        if (pszSlash)
     114        {
     115            *pszSlash = 0;
     116            aFullName.jolt();
     117        }
    111118    }
    112119    return Bstr(aFullName);
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