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

handle empty bus_num #17

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

Conversation

adzierzanowski
Copy link

When $bus_num is empty (e.g. in case of 05ac:8102 Apple Inc. Apple T2 Bus), the script throws the following error:

/usr/local/bin/lsusb: line 89: 16#: invalid integer constant (error token is "16#")

because it is not possible to treat an empty variable as a hexadecimal and convert it into an integer. My fix handles the situation by printing --- when the bus number is not provided.

@reitermarkus
Copy link

@jlhonora, can this be merged?

@robertlipe
Copy link

This is the same problem fixed - in a different way - in #18 also, so if you merge this one you can get a two-fer.
#18 was a confirmed fix for the version I installed via homebrew.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants