Changeset 36997 in vbox for trunk/src/VBox/Main
- Timestamp:
- May 6, 2011 11:30:23 PM (14 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/linux/USBProxyServiceLinux.cpp
r36995 r36997 141 141 pcszUsbFromEnv)); 142 142 fValidVBoxUSB = false; 143 pcszUsbFromEnv = NULL; 143 144 } 144 145 if (!fValidVBoxUSB && pcszUsbRoot) … … 160 161 } 161 162 } 163 else if (!USBProxyLinuxCheckDeviceRoot(pcszUsbRoot, fSysfsChosen)) 164 pcszUsbRoot = NULL; 162 165 if (pcszUsbRoot) 163 166 { … … 176 179 } 177 180 else 178 mLastError = RTDirExists("/dev/vboxusb") ? VERR_VUSB_USB_DEVICE_PERMISSION 181 mLastError = pcszUsbFromEnv ? VERR_NOT_FOUND 182 : RTDirExists("/dev/vboxusb") ? VERR_VUSB_USB_DEVICE_PERMISSION 179 183 : RTFileExists("/proc/bus/usb/devices") ? VERR_VUSB_USBFS_PERMISSION 180 184 : VERR_NOT_FOUND; -
trunk/src/VBox/Main/testcase/tstUSBProxyLinux.cpp
r36996 r36997 87 87 } s_testEnvironment[] = 88 88 { 89 /* "sysfs" and root in the environment */ 90 { "sysfs", "/dev/bus/usb", NULL, false, NULL, false, VINF_SUCCESS, "/dev/bus/usb", false, VINF_SUCCESS }, 91 /* "sysfs" and root in the environment, method-specific init failed */ 92 { "sysfs", "/dev/bus/usb", NULL, false, NULL, false, VERR_NO_MEMORY, "/dev/bus/usb", false, VERR_NO_MEMORY }, 93 /* "sysfs" and bad root in the environment (should succeed as we don't do checks if the user specifies everything) */ 94 { "sysfs", "/dev/bus/usb", "/dev/usbvbox", false, "/proc/usb/bus", false, VINF_SUCCESS, "/dev/bus/usb", false, VINF_SUCCESS }, 95 /* "sysfs" and bad root in the environment, method-specific init failed */ 96 { "sysfs", "/dev/bus/usb", "/dev/usbvbox", false, "/proc/usb/bus", false, VERR_NO_MEMORY, "/dev/bus/usb", false, VERR_NO_MEMORY }, 89 /* "sysfs" and valid root in the environment */ 90 { "sysfs", "/dev/bus/usb", "/dev/bus/usb", true, NULL, false, VINF_SUCCESS, "/dev/bus/usb", false, VINF_SUCCESS }, 91 /* "sysfs" and valid root in the environment, method-specific init failed */ 92 { "sysfs", "/dev/bus/usb", "/dev/bus/usb", true, NULL, false, VERR_NO_MEMORY, "/dev/bus/usb", false, VERR_NO_MEMORY }, 93 /* "sysfs" and bad root in the environment */ 94 { "sysfs", "/dev/bus/usb", "/dev/vboxusb", false, "/proc/usb/bus", false, VINF_SUCCESS, "", true, VERR_NOT_FOUND }, 97 95 /* "sysfs" and no root in the environment */ 98 96 { "sysfs", NULL, "/dev/vboxusb", true, NULL, false, VINF_SUCCESS, "/dev/vboxusb", false, VINF_SUCCESS }, 99 /* "usbfs" and root in the environment */ 100 { "usbfs", "/dev/bus/usb", NULL, false, NULL, false, VINF_SUCCESS, "/dev/bus/usb", true, VINF_SUCCESS }, 101 /* "usbfs" and root in the environment, method-specific init failed */ 102 { "usbfs", "/dev/bus/usb", NULL, false, NULL, false, VERR_NO_MEMORY, "/dev/bus/usb", true, VERR_NO_MEMORY }, 103 /* "usbfs" and bad root in the environment (should succeed as we don't do checks if the user specifies everything) */ 104 { "usbfs", "/dev/bus/usb", "/dev/usbvbox", false, "/proc/usb/bus", false, VINF_SUCCESS, "/dev/bus/usb", true, VINF_SUCCESS }, 105 /* "usbfs" and bad root in the environment, method-specific init failed */ 106 { "usbfs", "/dev/bus/usb", "/dev/usbvbox", false, "/proc/usb/bus", false, VERR_NO_MEMORY, "/dev/bus/usb", true, VERR_NO_MEMORY }, 97 /* "usbfs" and valid root in the environment */ 98 { "usbfs", "/dev/bus/usb", NULL, false, "/dev/bus/usb", true, VINF_SUCCESS, "/dev/bus/usb", true, VINF_SUCCESS }, 99 /* "usbfs" and valid root in the environment, method-specific init failed */ 100 { "usbfs", "/dev/bus/usb", NULL, false, "/dev/bus/usb", true, VERR_NO_MEMORY, "/dev/bus/usb", true, VERR_NO_MEMORY }, 101 /* "usbfs" and bad root in the environment */ 102 { "usbfs", "/dev/bus/usb", "/dev/vboxusb", false, "/proc/usb/bus", false, VINF_SUCCESS, "", true, VERR_NOT_FOUND }, 107 103 /* "usbfs" and no root in the environment */ 108 104 { "usbfs", NULL, NULL, false, "/proc/bus/usb", true, VINF_SUCCESS, "/proc/bus/usb", true, VINF_SUCCESS },
Note:
See TracChangeset
for help on using the changeset viewer.