VirtualBox

Changeset 64156 in vbox for trunk/src/VBox/GuestHost


Ignore:
Timestamp:
Oct 5, 2016 1:43:52 PM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
111134
Message:

bugref:8614: Additions/common/VBoxVideo: make the code more self-contained: disable all logging statements (comment them out, do not remove them) so as not to pull in the logging sub-system. Added a note suggesting that we give callers the information they need to do any logging.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/HGSMI/HGSMICommon.cpp

    r63546 r64156  
    1717
    1818#define LOG_DISABLED /* Maybe we can enabled it all the time now? */
     19/** @note commented out all logging statements to avoid pulling the logging
     20 * sub-system into places like the Linux kernel driver.  Perhaps the best
     21 * thing would be to use return enough information for callers to log what
     22 * is needed. */
    1923#define LOG_GROUP LOG_GROUP_HGSMI
    2024#include <iprt/heap.h>
     
    2226
    2327#include <VBox/HGSMI/HGSMI.h>
    24 #include <VBox/log.h>
     28// #include <VBox/log.h>
    2529
    2630
     
    272276                             HGSMIBUFFERCONTEXT *pBufferContext)
    273277{
    274     LogFlowFunc(("buffer 0x%x, area %p %x [0x%x;0x%x]\n",
    275                  offBuffer, pArea->pu8Base, pArea->cbArea, pArea->offBase, pArea->offLast));
     278    // LogFlowFunc(("buffer 0x%x, area %p %x [0x%x;0x%x]\n",
     279    //              offBuffer, pArea->pu8Base, pArea->cbArea, pArea->offBase, pArea->offLast));
    276280
    277281    int rc = VINF_SUCCESS;
     
    280284        || offBuffer > pArea->offLast)
    281285    {
    282         LogFunc(("offset 0x%x is outside the area [0x%x;0x%x]!!!\n",
    283                  offBuffer, pArea->offBase, pArea->offLast));
     286        // LogFunc(("offset 0x%x is outside the area [0x%x;0x%x]!!!\n",
     287        //          offBuffer, pArea->offBase, pArea->offLast));
    284288        rc = VERR_INVALID_PARAMETER;
    285289        HGSMI_STRICT_ASSERT_FAILED();
     
    293297         * data size for the buffer at this offset.
    294298         */
    295         LogFlowFunc(("datasize check: header.u32DataSize = 0x%x pArea->offLast - offBuffer = 0x%x\n",
    296                      header.u32DataSize, pArea->offLast - offBuffer));
     299        // LogFlowFunc(("datasize check: header.u32DataSize = 0x%x pArea->offLast - offBuffer = 0x%x\n",
     300        //              header.u32DataSize, pArea->offLast - offBuffer));
    297301
    298302        if (header.u32DataSize <= pArea->offLast - offBuffer)
     
    302306            /* At least both header and tail structures are in the area. Check the checksum. */
    303307            uint32_t u32Checksum = HGSMIChecksum(offBuffer, &header, &tail);
    304             LogFlowFunc(("checksum check: u32Checksum = 0x%x pTail->u32Checksum = 0x%x\n",
    305                          u32Checksum, tail.u32Checksum));
     308            // LogFlowFunc(("checksum check: u32Checksum = 0x%x pTail->u32Checksum = 0x%x\n",
     309            //              u32Checksum, tail.u32Checksum));
    306310            if (u32Checksum == tail.u32Checksum)
    307311            {
     
    313317            else
    314318            {
    315                 LogFunc(("invalid checksum 0x%x, expected 0x%x!!!\n",
    316                          u32Checksum, tail.u32Checksum));
     319                // LogFunc(("invalid checksum 0x%x, expected 0x%x!!!\n",
     320                //          u32Checksum, tail.u32Checksum));
    317321                rc = VERR_INVALID_STATE;
    318322                HGSMI_STRICT_ASSERT_FAILED();
     
    321325        else
    322326        {
    323             LogFunc(("invalid data size 0x%x, maximum is 0x%x!!!\n",
    324                      header.u32DataSize, pArea->offLast - offBuffer));
     327            // LogFunc(("invalid data size 0x%x, maximum is 0x%x!!!\n",
     328            //          header.u32DataSize, pArea->offLast - offBuffer));
    325329            rc = VERR_TOO_MUCH_DATA;
    326330            HGSMI_STRICT_ASSERT_FAILED();
     
    362366                       HGSMIOFFSET offBuffer)
    363367{
    364     LogFlowFunc(("pArea %p, offBuffer 0x%x\n", pArea, offBuffer));
     368    // LogFlowFunc(("pArea %p, offBuffer 0x%x\n", pArea, offBuffer));
    365369
    366370    AssertPtrReturn(pArea, VERR_INVALID_PARAMETER);
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette