Closed ThunderEX closed 3 years ago
Hi @ThunderEX,
This looks like a good improvement we can make. I want to make sure that this is also available in musl-libc since we would like to make releases using it in the future, but at first glance it looks supported. I'm going to do a little testing in a sample code, but once I get that figured out, I see no major issues using versionsort
instead.
Thx @vonericsen 🤗
I have a number of drives in my system, and when using
lsscsi
to list them the drives will show up in order of sg1, sg2,.. sg10, sg11, sg12,... But withopenSeaChest_something -s
, they could only be shown up in alphabetical order like sg1, sg10, sg11,.. sg19, sg2, sg20, sg21,.. sg3, sg4, sg5,... I could see that the problem is due toalphasort
used inscandir
: https://github.com/Seagate/opensea-transport/blob/5ce71525022ba195dd3b90c0cc8a5aee2a1b0f12/src/sg_helper.c#L1609 According to man page, usingversionsort
could sort it in numeric order. Could you please consider such an improvement?