VirtualBox

Ignore:
Timestamp:
Apr 20, 2016 4:09:24 PM (9 years ago)
Author:
vboxsync
Message:

Main/USBProxyBackend-freebsd.cpp: Fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/freebsd/USBProxyBackendFreeBSD.cpp

    r60156 r60606  
    6060 * Initialize data members.
    6161 */
    62 USBProxyBackendFreeBSD::USBProxyBackendFreeBSD(USBProxyService *aUsbProxyService, const com::Utf8Str &strId)
    63     : USBProxyBackend(aUsbProxyService, strId)
    64 {
    65     LogFlowThisFunc(("aUsbProxyService=%p\n", aUsbProxyService));
    66 }
    67 
     62USBProxyBackendFreeBSD::USBProxyBackendFreeBSD()
     63    : USBProxyBackend(), mNotifyEventSem(NIL_RTSEMEVENT)
     64{
     65    LogFlowThisFunc(("\n"));
     66}
     67
     68USBProxyBackendFreeBSD::~USBProxyBackendFreeBSD()
     69{
     70    LogFlowThisFunc(("\n"));
     71}
    6872
    6973/**
     
    7276 * @returns S_OK on success and non-fatal failures, some COM error otherwise.
    7377 */
    74 int USBProxyBackendFreeBSD::init(USBProxyService *pUsbProxyService, const com::Utf8Str &strId, const com::Utf8Str &strAddresss)
     78int USBProxyBackendFreeBSD::init(USBProxyService *pUsbProxyService, const com::Utf8Str &strId, const com::Utf8Str &strAddress)
    7579{
    7680    USBProxyBackend::init(pUsbProxyService, strId, strAddress);
     
    96100 * Stop all service threads and free the device chain.
    97101 */
    98 USBProxyBackendFreeBSD::~USBProxyBackendFreeBSD()
     102void USBProxyBackendFreeBSD::uninit()
    99103{
    100104    LogFlowThisFunc(("\n"));
     
    108112    RTSemEventDestroy(mNotifyEventSem);
    109113    mNotifyEventSem = NULL;
     114    USBProxyBackend::uninit();
    110115}
    111116
     
    236241        rc = RTStrAPrintf(&pszDevicePath, "/dev/%s%d.%d", USB_GENERIC_NAME, iBus, iAddr);
    237242        if (RT_FAILURE(rc))
    238         {
    239             mLastError = rc;
    240243            break;
    241         }
    242244
    243245        LogFlowFunc((": Opening %s\n", pszDevicePath));
     
    246248        if (FileUsb < 0)
    247249        {
    248             if (   (errno != ENOENT)
    249                 && (errno != EACCES))
    250                 mLastError = RTErrConvertFromErrno(errno);
    251 
    252250            RTStrFree(pszDevicePath);
    253251
     
    277275        {
    278276            LogFlowFunc((": Error querying device info rc=%Rrc\n", RTErrConvertFromErrno(errno)));
    279             mLastError = RTErrConvertFromErrno(errno);
    280277            close(FileUsb);
    281278            RTStrFree(pszDevicePath);
     
    289286            if (!pDevice)
    290287            {
    291                 mLastError = VERR_NO_MEMORY;
    292288                close(FileUsb);
    293289                RTStrFree(pszDevicePath);
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