VirtualBox

Changeset 3046 in vbox for trunk/src


Ignore:
Timestamp:
Jun 5, 2007 11:06:18 AM (18 years ago)
Author:
vboxsync
Message:

Fixed linux and darwin regressions.

File:
1 edited

Legend:

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

    r3035 r3046  
    847847    AssertReturn (isLockedOnCurrentThread(), -1);
    848848
     849#ifdef __WIN__
    849850    return compare (mUsb, aDev2, !isStatePending());
     851#else
     852    /* Since we fake the requests anyway, there is no need to unnecessarily
     853       expose ourselves to trouble the non-strict compare may cause on
     854       release/capture/unplug/plug/similar-devices. */
     855    return compare (mUsb, aDev2, true /* strict */);
     856#endif
    850857}
    851858
    852859/**
    853860 *  Compares two USB devices and decides which comes first.
    854  * 
     861 *
    855862 *  If @a aIsStrict is @c true then the comparison will indicate a difference
    856863 *  even if the same physical device (represented by @a aDev1) has been just
     
    964971                    isImportant = false;
    965972                    break;
     973#ifndef __WIN__ /* Only windows really knows whether the device is busy or used captured. */
     974                case USBDeviceState_USBDeviceCaptured:
     975                    if (!mIsStatePending)
     976                        return false;
     977                    /* fall thru */
     978#endif
    966979                default:
    967980                    isImportant = true;
     
    982995                    isImportant = false;
    983996                    break;
     997#ifndef __WIN__ /* Only Windows really knows whether the device is busy or used captured. */
     998                case USBDeviceState_USBDeviceCaptured:
     999                    if (!mIsStatePending)
     1000                        return false;
     1001                    /* fall thru */
     1002#endif
    9841003                default:
    9851004                    isImportant = true;
     
    9951014                case USBDeviceState_USBDeviceAvailable:
    9961015                    return false;
    997 #ifdef __LINUX__ /* hack for /proc/bus/usb/devices not putting up a driver any longer. */
     1016#ifdef __LINUX__ /* Hack for /proc/bus/usb/devices not necessarily putting up a driver. */
    9981017                case USBDeviceState_USBDeviceCaptured:
    9991018                    if (!mIsStatePending)
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