Changeset 69753 in vbox for trunk/src/VBox/ValidationKit/utils/usb
- Timestamp:
- Nov 19, 2017 2:27:58 PM (7 years ago)
- Location:
- trunk/src/VBox/ValidationKit/utils/usb
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/utils/usb/UsbTest.cpp
r69111 r69753 303 303 #define USBTEST_USB_DEV_SYSFS "/sys/bus/usb/devices/" 304 304 305 PRTDIR pDirUsb = NULL;306 int rc = RTDirOpen(& pDirUsb, USBTEST_USB_DEV_SYSFS);305 RTDIR hDirUsb = NULL; 306 int rc = RTDirOpen(&hDirUsb, USBTEST_USB_DEV_SYSFS); 307 307 if (RT_SUCCESS(rc)) 308 308 { … … 310 310 { 311 311 RTDIRENTRY DirUsbBus; 312 rc = RTDirRead( pDirUsb, &DirUsbBus, NULL);312 rc = RTDirRead(hDirUsb, &DirUsbBus, NULL); 313 313 if ( RT_SUCCESS(rc) 314 314 && RTStrNCmp(DirUsbBus.szName, "usb", 3) … … 368 368 rc = VINF_SUCCESS; 369 369 370 RTDirClose( pDirUsb);370 RTDirClose(hDirUsb); 371 371 } 372 372 … … 390 390 char *pszDevPath = NULL; 391 391 392 PRTDIR pDirUsb = NULL;393 int rc = RTDirOpen(& pDirUsb, "/dev/bus/usb");392 RTDIR hDirUsb = NULL; 393 int rc = RTDirOpen(&hDirUsb, "/dev/bus/usb"); 394 394 if (RT_SUCCESS(rc)) 395 395 { … … 397 397 { 398 398 RTDIRENTRY DirUsbBus; 399 rc = RTDirRead( pDirUsb, &DirUsbBus, NULL);399 rc = RTDirRead(hDirUsb, &DirUsbBus, NULL); 400 400 if (RT_SUCCESS(rc)) 401 401 { … … 403 403 RTStrPrintf(&aszPath[0], RT_ELEMENTS(aszPath), "/dev/bus/usb/%s", DirUsbBus.szName); 404 404 405 PRTDIR pDirUsbBus = NULL;406 rc = RTDirOpen(& pDirUsbBus, &aszPath[0]);405 RTDIR hDirUsbBus = NULL; 406 rc = RTDirOpen(&hDirUsbBus, &aszPath[0]); 407 407 if (RT_SUCCESS(rc)) 408 408 { … … 410 410 { 411 411 RTDIRENTRY DirUsbDev; 412 rc = RTDirRead( pDirUsbBus, &DirUsbDev, NULL);412 rc = RTDirRead(hDirUsbBus, &DirUsbDev, NULL); 413 413 if (RT_SUCCESS(rc)) 414 414 { … … 441 441 442 442 rc = VINF_SUCCESS; 443 RTDirClose( pDirUsbBus);443 RTDirClose(hDirUsbBus); 444 444 } 445 445 } … … 449 449 && !pszDevPath); 450 450 451 RTDirClose( pDirUsb);451 RTDirClose(hDirUsb); 452 452 } 453 453 -
trunk/src/VBox/ValidationKit/utils/usb/UsbTestServicePlatform-linux.cpp
r69674 r69753 125 125 return VERR_BUFFER_OVERFLOW; 126 126 127 PRTDIR pDir = NULL;128 rc = RTDirOpenFiltered(& pDir, aszPath, RTDIRFILTER_WINNT, 0 /*fFlags*/);127 RTDIR hDir = NULL; 128 rc = RTDirOpenFiltered(&hDir, aszPath, RTDIRFILTER_WINNT, 0 /*fFlags*/); 129 129 if (RT_SUCCESS(rc)) 130 130 { … … 132 132 { 133 133 RTDIRENTRY DirFolderContent; 134 rc = RTDirRead( pDir, &DirFolderContent, NULL);134 rc = RTDirRead(hDir, &DirFolderContent, NULL); 135 135 if (RT_SUCCESS(rc)) 136 136 { … … 182 182 rc = VINF_SUCCESS; 183 183 184 RTDirClose( pDir);184 RTDirClose(hDir); 185 185 } 186 186 … … 205 205 206 206 /* Enumerate the available HCD and their bus numbers. */ 207 PRTDIR pDir = NULL;208 int rc = RTDirOpenFiltered(& pDir, aszPath, RTDIRFILTER_WINNT, 0 /*fFlags*/);207 RTDIR hDir = NULL; 208 int rc = RTDirOpenFiltered(&hDir, aszPath, RTDIRFILTER_WINNT, 0 /*fFlags*/); 209 209 if (RT_SUCCESS(rc)) 210 210 { … … 215 215 { 216 216 RTDIRENTRY DirFolderContent; 217 rc = RTDirRead( pDir, &DirFolderContent, NULL);217 rc = RTDirRead(hDir, &DirFolderContent, NULL); 218 218 if (RT_SUCCESS(rc)) 219 219 { … … 270 270 rc = VINF_SUCCESS; 271 271 272 RTDirClose( pDir);272 RTDirClose(hDir); 273 273 } 274 274
Note:
See TracChangeset
for help on using the changeset viewer.