Changeset 69753 in vbox for trunk/src/VBox/ValidationKit/utils/usb/UsbTest.cpp
- Timestamp:
- Nov 19, 2017 2:27:58 PM (7 years ago)
- File:
-
- 1 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
Note:
See TracChangeset
for help on using the changeset viewer.