exterr: Sort output from make_libc_exterr_cat_filenames.sh

Otherwise the script may permute the order of entries in the file since
find(1) output is not stable.

Reviewed by:	kib
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D54669
This commit is contained in:
Mark Johnston
2026-01-16 15:56:09 +00:00
parent e2d7bec6bc
commit bda6ed2ee4
@@ -14,7 +14,7 @@ printf " * Automatically %sgenerated, use\\n" \@ >>"${target}"
echo " * tools/build/make_libc_exterr_cat_filenames.sh" >>"${target}"
echo " */" >>"${target}"
(find sys -type f -name '*.c' | \
(find -s sys -type f -name '*.c' | \
xargs grep -E '^#define[[:space:]]+EXTERR_CATEGORY[[:space:]]+EXTERR_CAT_' | \
sed -E 's/[[:space:]]+/:/g' | \
awk -F ':' '{filename = $1; sub(/^sys\//, "", filename);