VirtualBox

Changeset 24933 in vbox for trunk


Ignore:
Timestamp:
Nov 25, 2009 10:50:21 AM (15 years ago)
Author:
vboxsync
Message:

Main: Logging.

Location:
trunk/src/VBox/Main
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/Global.cpp

    r24626 r24933  
    213213            return s_szMsg;
    214214        }
    215 
    216215    }
    217216}
     
    234233            return s_szMsg;
    235234        }
    236 
     235    }
     236}
     237
     238/*static*/ const char *
     239Global::stringifyDeviceType(DeviceType_T aType)
     240{
     241    switch (aType)
     242    {
     243        case DeviceType_Null:         return "Null";
     244        case DeviceType_Floppy:       return "Floppy";
     245        case DeviceType_DVD:          return "DVD";
     246        case DeviceType_HardDisk:     return "HardDisk";
     247        case DeviceType_Network:      return "Network";
     248        case DeviceType_USB:          return "USB";
     249        case DeviceType_SharedFolder: return "ShardFolder";
     250        default:
     251        {
     252            AssertMsgFailed(("%d (%#x)\n", aType, aType));
     253            static char s_szMsg[48];
     254            RTStrPrintf(s_szMsg, sizeof(s_szMsg), "InvalidType-0x%08x\n", aType);
     255            return s_szMsg;
     256        }
    237257    }
    238258}
  • trunk/src/VBox/Main/MediumImpl.cpp

    r24905 r24933  
    338338HRESULT Medium::Task::runNow()
    339339{
     340    /* NIL_RTTHREAD indicates synchronous call. */
    340341    Medium::taskThread(NIL_RTTHREAD, this);
    341342
     
    19331934            m->preLockState = m->state;
    19341935
    1935             LogFlowThisFunc(("Okay - prev state=%d\n", m->state));
     1936            LogFlowThisFunc(("Okay - prev state=%d locationFull=%s\n", m->state, locationFull().c_str()));
    19361937            m->state = MediumState_LockedWrite;
    19371938            break;
     
    19391940        default:
    19401941        {
    1941             LogFlowThisFunc(("Failing - state=%d\n", m->state));
     1942            LogFlowThisFunc(("Failing - state=%d locationFull=%s\n", m->state, locationFull().c_str()));
    19421943            rc = setStateError();
    19431944            break;
     
    19661967        {
    19671968            m->state = m->preLockState;
    1968             LogFlowThisFunc(("new state=%d\n", m->state));
     1969            LogFlowThisFunc(("new state=%d locationFull=%s\n", m->state, locationFull().c_str()));
    19691970            break;
    19701971        }
    19711972        default:
    19721973        {
    1973             LogFlowThisFunc(("Failing - state=%d\n", m->state));
     1974            LogFlowThisFunc(("Failing - state=%d locationFull=%s\n", m->state, locationFull().c_str()));
    19741975            rc = setError(VBOX_E_INVALID_OBJECT_STATE,
    19751976                          tr ("Medium '%s' is not locked for writing"),
     
    40244025
    40254026    AutoMultiWriteLock2 alock(mVirtualBox->lockHandle(), this->lockHandle());
     4027    LogFlowThisFunc(("aWait=%RTbool locationFull=%s\n", aWait, locationFull().c_str() ));
    40264028
    40274029    if (    !(m->formatObj->capabilities() & (   MediumFormatCapabilities_CreateDynamic
  • trunk/src/VBox/Main/include/Global.h

    r24618 r24933  
    163163
    164164    /**
     165     * Stringify a device type.
     166     *
     167     * @returns Pointer to a read only string.
     168     * @param   aType       The device type.
     169     */
     170    static const char *stringifyDeviceType(DeviceType_T aType);
     171
     172    /**
    165173     * Try convert a COM status code to a VirtualBox status code (VBox/err.h).
    166174     *
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