--- - branch: MAIN date: Tue Apr 23 22:12:16 UTC 2024 files: - new: '1.34' old: '1.33' path: src/usr.sbin/makefs/walk.c pathrev: src/usr.sbin/makefs/walk.c@1.34 type: modified id: 20240423T221216Z.41e8741fc62999b031ac8c9cee5d5200eb715144 log: | 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. module: src subject: 'CVS commit: src/usr.sbin/makefs' unixtime: '1713910336' user: christos