Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xusb minor fixes: Restore LIBUSB_DEBUG check, check for vid:pid #1513

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

tormodvolden
Copy link
Contributor

No description provided.

RinHizakura and others added 4 commits June 15, 2024 01:05
Consider different scenario to return from main, we have to
choose the proper return value. In this way, we can easily
check the return code directly like `echo $?` in Linux to know
whether the execution of xusb is failed.

Signed-off-by: Yiwei Lin <[email protected]>
a) xusb should set log level to INFO unless run with -d or if LIBUSB_DEBUG
has been set by the user.

b) It also used to set LIBUSB_DEBUG itself in order to get log output
already during libusb_init.

When we in commit 0929a2b replaced (b) with use of libusb_init_context()
the probe for LIBUSB_DEBUG (a) was inadvertently removed. Restore this.

Also remove some unused remains of previous LIBUSB_DEBUG resetting.

Signed-off-by: Tormod Volden <[email protected]>
And adjust variable scope. No behaviorial changes.

Signed-off-by: Tormod Volden <[email protected]>
Also combine the argument count check now that we do it up front,
resulting in one indentation level less.

Fixes libusb#1438

Signed-off-by: Tormod Volden <[email protected]>
@tormodvolden tormodvolden added the Examples Examples label Jun 17, 2024
Make testlibusb output align better, like lsusb does it.

Signed-off-by: Tormod Volden <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Examples Examples
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants