Closed tchebb closed 3 years ago
@ValZapod yes, it ought to. get_sysfs_name()
creates the full dotted path within sysfs that corresponds to the device you give it.
Thanks for this fix, it looks to be the most "complete" of the 3 different ways people have worked to address this issue. I'll merge it and see if it resolves everyone's issues...
First off, I want to acknowledge that this pull request includes a fix for the same issue #108 fixes. I didn't notice that PR until I was almost done with this one, but I do think that the additional code cleanup and refactoring I did makes this PR worth reviewing, even ignoring its other changes.
So what are those other fixes? The commit messages have details, but to summarize they are
-D
.-v
, fetch strings for iManufacturer, iProduct, and iSerial from sysfs instead of from libusb. This allows these values to be populated even when we don't have permission to open the device.Edit: I just noticed that #103 is ALSO a fix for the sysfs path issue. That fix is implemented very differently from mine but also makes sense.