VirtualBox

Changeset 53801 in vbox for trunk/src/VBox/Devices/VMMDev


Ignore:
Timestamp:
Jan 14, 2015 1:31:53 PM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
97609
Message:

Devices: use LogRelMax were appropriate

Location:
trunk/src/VBox/Devices/VMMDev
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/VMMDev/VMMDev.cpp

    r53767 r53801  
    744744        if (!pEntry)
    745745        {
    746             static int g_cLogEntries = 0;
    747             if (g_cLogEntries++ < 10)
    748                 LogRel(("VMM: Facility table is full - facility=%u status=%u.\n", pStatus->facility, pStatus->status));
     746            LogRelMax(10, ("VMM: Facility table is full - facility=%u status=%u.\n", pStatus->facility, pStatus->status));
    749747            return VERR_OUT_OF_RESOURCES;
    750748        }
     
    27262724        else
    27272725        {
    2728             static int s_cRelWarn;
    2729             if (s_cRelWarn < 10)
    2730             {
    2731                 s_cRelWarn++;
    2732                 LogRel(("VMMDev: the guest has not yet reported to us -- refusing operation of request #%d\n",
     2726            LogRelMax(10, ("VMMDev: the guest has not yet reported to us -- refusing operation of request #%d\n",
    27332727                        requestHeader.requestType));
    2734             }
    27352728            requestHeader.rc = VERR_NOT_SUPPORTED;
    27362729        }
     
    27382731    else
    27392732    {
    2740         static int s_cRelWarn;
    2741         if (s_cRelWarn < 50)
    2742         {
    2743             s_cRelWarn++;
    2744             LogRel(("VMMDev: request packet too big (%x). Refusing operation.\n", requestHeader.size));
    2745         }
     2733        LogRelMax(50, ("VMMDev: request packet too big (%x). Refusing operation.\n", requestHeader.size));
    27462734        requestHeader.rc = VERR_NOT_SUPPORTED;
    27472735    }
  • trunk/src/VBox/Devices/VMMDev/VMMDevHGCM.cpp

    r50982 r53801  
    652652    if (cParms > VMMDEV_MAX_HGCM_PARMS)
    653653    {
    654         static int s_cRelWarn;
    655         if (s_cRelWarn < 50)
    656         {
    657             s_cRelWarn++;
    658             LogRel(("VMMDev: request packet with too many parameters (%d). Refusing operation.\n", cParms));
    659         }
     654        LogRelMax(50, ("VMMDev: request packet with too many parameters (%d). Refusing operation.\n", cParms));
    660655        return VERR_INVALID_PARAMETER;
    661656    }
     
    12011196    if (cParms > VMMDEV_MAX_HGCM_PARMS)
    12021197    {
    1203         static int s_cRelWarn;
    1204         if (s_cRelWarn < 50)
    1205         {
    1206             s_cRelWarn++;
    1207             LogRel(("VMMDev: request packet with too many parameters (%d). Refusing operation.\n", cParms));
    1208         }
     1198        LogRelMax(50, ("VMMDev: request packet with too many parameters (%d). Refusing operation.\n", cParms));
    12091199        return VERR_INVALID_PARAMETER;
    12101200    }
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