Closed holgersson32644 closed 3 weeks ago
Thanks for the report. I was actually aware that the ordering could be different but I thought it was random. I had based that on my initial development pre this change to lsusb
where sorting was added: https://github.com/gregkh/usbutils/commit/2e08ffdf19a3dc8cbb811a30d7f990d6517ea137
Now lsusb
sorts the devices within the tree, I'll make a change to match. There is actually the cyme --sort-devices device-number
flag but it sorts in order of device number independent of bus number so looks odd without --tree
- need to rethink that logic. They also followed up with this to keep bus order so I'll do the same.
If you're interested in testing, I have a branch with a change that should now sort by bus number and device number on each bus. Now --lsusb
and lsusb
order should match. https://github.com/tuna-f1sh/cyme/pull/34
I tried it and can confirm that cyme --lsusb
shows the ordered output now. Thanks!
Hi, your tool looks interesting, thanks for sharing it!
I noticed that the device order differs in details between
lsusb
andcyme -l
(orcyme --lsusb
) while you mention identical output as one of the project goals, so I wanted to provide you that feedback.The outputs of cyme and lsusb follow here. For differences see e.g. the order of Bus1, devices 1, and 2 or Bus6 where I don’t see an ordering.
I'm running on Gentoo with sys-apps/cyme-1.8.2 (build with
rustc 1.81.0 (eeb90cda1 2024-09-04) (gentoo)
), but I can reproduce this with your released binary, too. I'm using the C locale globally in my shells, and setting LANG for both tools had no impact on the output.