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

invalid integer constant (error token is "16#") #18

Open
ghazel opened this issue May 10, 2022 · 1 comment
Open

invalid integer constant (error token is "16#") #18

ghazel opened this issue May 10, 2022 · 1 comment

Comments

@ghazel
Copy link

ghazel commented May 10, 2022

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

Looks like there is no bus number:

% lsusb -v
USB:

    USB 3.1 Bus:

      Host Controller Driver: AppleT6000USBXHCI

    USB 3.1 Bus:

      Host Controller Driver: AppleT6000USBXHCI

    USB 3.1 Bus:

      Host Controller Driver: AppleT6000USBXHCI

FWIW, this silences the error:

--- /opt/homebrew/bin/lsusb	2022-05-10 12:52:43.000000000 -0700
+++ lsusb	2022-05-10 12:52:59.000000000 -0700
@@ -86,7 +86,7 @@
 	fi
 
 	# Convert bus number from hexadecimal to decimal.
-	bus_num=`echo "$((16#$bus_num))"`
+	bus_num=`echo "obase=10; ibase=16; $bus_num" |bc`
         bus_num=`printf "%0*d" 3 "$bus_num"`
 
 	# Strip the parentheses from manufacturer name unless so specified.
@phuclv90
Copy link

it's not actually the root cause. Please check out this which solves the issue #23

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

No branches or pull requests

2 participants