{"id":135,"date":"2005-06-08T15:06:20","date_gmt":"2005-06-08T12:06:20","guid":{"rendered":"https:\/\/void.gr\/kargig\/blog\/2005\/06\/08\/usbutils-problems-and-solution\/"},"modified":"2005-06-08T15:06:20","modified_gmt":"2005-06-08T12:06:20","slug":"usbutils-problems-and-solution","status":"publish","type":"post","link":"https:\/\/www.void.gr\/kargig\/blog\/2005\/06\/08\/usbutils-problems-and-solution\/","title":{"rendered":"usbutils problems and solution"},"content":{"rendered":"<p>I just wanted a tool to easily monitor my usb devices, and that should be <a href=\"http:\/\/www.lrr.in.tum.de\/Par\/arch\/usb\/\">lsusb<\/a> . In Gentoo it&#8217;s inside usbutils package, but when I tried to emerge it I got a ton of errors like that:<\/p>\n<p><code>In file included from \/usr\/include\/linux\/usb.h:4,<br \/>\n                 from access.c:34:<br \/>\n\/usr\/include\/linux\/mod_devicetable.h:18: error: syntax error before \"__u32\"<br \/>\n\/usr\/include\/linux\/mod_devicetable.h:20: error: syntax error before \"class\"<br \/>\n\/usr\/include\/linux\/mod_devicetable.h:21: error: syntax error before \"driver_data\"<br \/>\n\/usr\/include\/linux\/mod_devicetable.h:31: error: syntax error before \"__u32\"<br \/>\n\/usr\/include\/linux\/mod_devicetable.h:33: error: syntax error before \"model_id\"<br \/>\n\/usr\/include\/linux\/mod_devicetable.h:34: error: syntax error before \"specifier_id\"<br \/>\n\/usr\/include\/linux\/mod_devicetable.h:35: error: syntax error before \"version\"<br \/>\n\/usr\/include\/linux\/mod_devicetable.h:36: error: syntax error before \"driver_data\"<br \/>\n\/usr\/include\/linux\/mod_devicetable.h:99: error: syntax error before \"__u16\"<br \/>\n\/usr\/include\/linux\/mod_devicetable.h:103: error: syntax error before \"idProduct\"<br \/>\n\/usr\/include\/linux\/mod_devicetable.h:104: error: syntax error before \"bcdDevice_lo\"<br \/>\n\/usr\/include\/linux\/mod_devicetable.h:105: error: syntax error before \"bcdDevice_hi\"<br \/>\n\/usr\/include\/linux\/mod_devicetable.h:108: error: syntax error before \"bDeviceClass\"<br \/>\n\/usr\/include\/linux\/mod_devicetable.h:109: error: syntax error before \"bDeviceSubClass\"<br \/>\n\/usr\/include\/linux\/mod_devicetable.h:110: error: syntax error before \"bDeviceProtocol\"<br \/>\n\/usr\/include\/linux\/mod_devicetable.h:113: error: syntax error before \"bInterfaceClass\"<br \/>\n\/usr\/include\/linux\/mod_devicetable.h:114: error: syntax error before \"bInterfaceSubClass\"<br \/>\n\/usr\/include\/linux\/mod_devicetable.h:115: error: syntax error before \"bInterfaceProtocol\"<br \/>\n\/usr\/include\/linux\/mod_devicetable.h:118: error: syntax error before \"driver_info\"<br \/>\n\/usr\/include\/linux\/mod_devicetable.h:135: error: syntax error before \"__u16\"<br \/>\n\/usr\/include\/linux\/mod_devicetable.h:138: error: syntax error before \"dev_type\"<br \/>\n\/usr\/include\/linux\/mod_devicetable.h:139: error: syntax error before \"cu_model\"<br \/>\n\/usr\/include\/linux\/mod_devicetable.h:140: error: syntax error before \"dev_model\"<br \/>\n\/usr\/include\/linux\/mod_devicetable.h:142: error: syntax error before \"driver_info\"<br \/>\n\/usr\/include\/linux\/mod_devicetable.h:155: error: syntax error before \"__u8\"<br \/>\n\/usr\/include\/linux\/mod_devicetable.h:160: error: syntax error before \"__u8\"<br \/>\n\/usr\/include\/linux\/mod_devicetable.h:163: error: syntax error before \"__u8\"<br \/>\n\/usr\/include\/linux\/mod_devicetable.h:165: error: syntax error before '}' token<br \/>\n<\/code><\/p>\n<p>The solution was to edit \/usr\/src\/linux\/include\/linux\/usb.h and comment out lines 4 and 5:<br \/>\n<code><br \/>\n4 \/*#include <linux \/mod_devicetable.h>\n5 #include <\/linux><linux \/usb_ch9.h>*\/\n<\/linux><\/code><\/p>\n<p>Then I emerged usbutils just fine&#8230;uncommented the previous lines&#8230;and everything is working properly:<\/p>\n<p><code># lsusb<br \/>\nUnknown line at line 1809<br \/>\nDuplicate HUT Usage Spec at line 2650<br \/>\nBus 004 Device 004: ID 058f:9254 Alcor Micro, Inc. Hub<br \/>\nBus 004 Device 001: ID 0000:0000 Virtual Hub<br \/>\nBus 003 Device 001: ID 0000:0000 Virtual Hub<br \/>\nBus 002 Device 001: ID 0000:0000 Virtual Hub<br \/>\nBus 001 Device 002: ID 05e3:0702 Genesys Logic, Inc.<br \/>\nBus 001 Device 001: ID 0000:0000 Virtual Hub<br \/>\n<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I just wanted a tool to easily monitor my usb devices, and that should be lsusb . In Gentoo it&#8217;s inside usbutils package, but when I tried to emerge it I got a ton of errors like that: In file included from \/usr\/include\/linux\/usb.h:4, from access.c:34: \/usr\/include\/linux\/mod_devicetable.h:18: error: syntax error before &#8220;__u32&#8221; \/usr\/include\/linux\/mod_devicetable.h:20: error: syntax error [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ep_exclude_from_search":false,"footnotes":""},"categories":[1,3],"tags":[],"class_list":["post-135","post","type-post","status-publish","format-standard","hentry","category-general","category-linux"],"aioseo_notices":[],"views":3795,"_links":{"self":[{"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/posts\/135","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/comments?post=135"}],"version-history":[{"count":0,"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/posts\/135\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/media?parent=135"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/categories?post=135"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/tags?post=135"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}