hidtest: report VID and PID in hid_open failure message #14

Closed
emaste wants to merge 1 commit from hid-open into master
emaste commented 2019-06-08 09:37:07 -05:00 (Migrated from github.com)

hidtest attempts to open a device with VID:PID 04d8:00x3f and previously
reported just "unable to open device" if that device was not found.
Include the VID:PID in the error message to clarify the issue.

hidtest attempts to open a device with VID:PID 04d8:00x3f and previously reported just "unable to open device" if that device was not found. Include the VID:PID in the error message to clarify the issue.
Qbicz (Migrated from github.com) reviewed 2019-06-09 13:52:57 -05:00
@ -73,3 +73,3 @@
if (!handle) {
printf("unable to open device\n");
printf("unable to open device %04x:%04x\n", 0x4d8, 0x3f);
return 1;
Qbicz (Migrated from github.com) commented 2019-06-09 13:52:52 -05:00

Probably anyone using this example is going to adjust the VID and PID. What about putting them to variables and using this variable in printf call?

Probably anyone using this example is going to adjust the VID and PID. What about putting them to variables and using this variable in `printf` call?
Qbicz commented 2019-06-24 16:18:48 -05:00 (Migrated from github.com)

@emaste are you going to follow up?

@emaste are you going to follow up?
Youw commented 2019-11-30 12:44:20 -06:00 (Migrated from github.com)

let's re-open, when author responds

let's re-open, when author responds

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-libusb/hidapi!14
No description provided.