VirtualBox

Changeset 41004 in vbox for trunk/src/VBox/VMM/VMMR3


Ignore:
Timestamp:
Apr 20, 2012 1:02:49 PM (13 years ago)
Author:
vboxsync
Message:

VMM/cfgmR3Dump: human-readable sizes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/CFGM.cpp

    r39859 r41004  
    30503050        {
    30513051            case CFGMVALUETYPE_INTEGER:
    3052                 pHlp->pfnPrintf(pHlp, "  %-*s <integer> = %#018llx (%lld)\n", (int)cchMax, pLeaf->szName, pLeaf->Value.Integer.u64, pLeaf->Value.Integer.u64);
     3052            {
     3053                pHlp->pfnPrintf(pHlp, "  %-*s <integer> = %#018llx (%lld", (int)cchMax, pLeaf->szName, pLeaf->Value.Integer.u64, pLeaf->Value.Integer.u64);
     3054                size_t cchLeafName = strlen(pLeaf->szName);
     3055                if (   cchLeafName >= 4
     3056                    && !RTStrCmp(&pLeaf->szName[cchLeafName - 4], "Size"))
     3057                {
     3058                    if (pLeaf->Value.Integer.u64 > _2M)
     3059                        pHlp->pfnPrintf(pHlp, ", %lldMB", pLeaf->Value.Integer.u64 / _1M);
     3060                    else if (pLeaf->Value.Integer.u64 > 2 * _1K)
     3061                        pHlp->pfnPrintf(pHlp, ", %lldKB", pLeaf->Value.Integer.u64 / _1K);
     3062                }
     3063                pHlp->pfnPrintf(pHlp, ")\n");
    30533064                break;
     3065            }
    30543066
    30553067            case CFGMVALUETYPE_STRING:
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