Module Name: src Committed By: christos Date: Tue Apr 23 22:12:16 UTC 2024
Modified Files: src/usr.sbin/makefs: walk.c Log Message: makefs: Sort directory contents by name (Jan-Benedict Glaw) `makefs` inserts nodes into its internal data structures in the order as returned by `readdir()` calls. As this is unpredictable, sort entries by name before creating the target filesystem. This is done by first converting the (per-directory) linked list into a plain array, sort it, finally re-link the list. Special case for the sorting function: The "." directory entry seems to be ment to be always at the front, so always check that first. To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/usr.sbin/makefs/walk.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.