On 2025-02-12 05:33, Corinna Vinschen wrote:
On Feb 11 16:13, Jeremy Drake via Cygwin-patches wrote:
On Tue, 11 Feb 2025, Corinna Vinschen wrote:
On Feb 10 17:13, Jeremy Drake via Cygwin-patches wrote:
make mappings linked list in order rather than reverse order.
Why? I'm not asking for myself, but for the commit message.
It may profit a lot from explaining what the change is supposed
to accomplish. :)
That's two good points: 1) I didn't write a proper commit message, I'll
do that for v3. but 2), why does the order of the list matter?
It doesn't. Or rather, it shouldn't. The drive letters were in order in /
cygdrive just because of the algorithm evaluating available_drives. That's
nice, but not essential.
On my system, the order returned by the functions matches my "expected"
order (my C: comes before my D:), but I don't think there's any guarantee
that that will always be the case. I don't think it matters other than
for aesthetics though,
The order in /proc/self/mounts on Linux is the order in which the
drives got mounted. You don't get them sorted unless you pipe it
through sort. That's ok with me.
but I don't know the motivation behind returning the
explicit mount entries in native_sorted order. Is there any reason why I
might need to sort the cygdrive mount entries? I could see that getting
complicated.
No sorting necessary. I'm actually really only talking about the commit
message. It should explain what you're doing and, especially, why.
Sorting could be achieved by inserting entries into the list in any required
order, or by similarly populating an auxiliary array of list entry pointers in
any required order.
--
Take care. Thanks, Brian Inglis Calgary, Alberta, Canada
La perfection est atteinte Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter not when there is no more to add
mais lorsqu'il n'y a plus rien à retrancher but when there is no more to cut
-- Antoine de Saint-Exupéry