Skip to content

Commit 7e88896

Browse files
committed
maint: avoid effects of locale when sorting files
* maint/ioctls_gen.sh: Invoke sort with LC_COLLATE=C. * maint/ioctls_hex.sh: Likewise. * maint/ioctls_sym.sh: Likewise. Reported-by: Philippe De Muyter <[email protected]>
1 parent 6779e71 commit 7e88896

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

maint/ioctls_gen.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ msg "generated $(grep -c '^{' ioctls_sym.h) symbolic ioctls from $inc_dir"
9090

9191
# Output all ioctl definitions fetched from include-directory.
9292
echo "/* Generated by $me from definitions found in ${inc_dir%%/}/ tree. */" > ioctls_inc.h
93-
sort -u ioctls_hex.h ioctls_sym.h >> ioctls_inc.h
93+
LC_COLLATE=C sort -u ioctls_hex.h ioctls_sym.h >> ioctls_inc.h
9494
msg "generated $(grep -c '^{' ioctls_inc.h) ioctls from $inc_dir"
9595

9696
[ -n "$arch_dir" ] || exit 0
@@ -110,5 +110,5 @@ msg "generated $(grep -c '^{' ioctls_sym.h) symbolic ioctls from $arch_dir"
110110

111111
# Output all ioctl definitions fetched from arch-include-directory.
112112
echo "/* Generated by $me from definitions found in ${arch_dir%%/}/ tree. */" > ioctls_arch.h
113-
sort -u ioctls_hex.h ioctls_sym.h >> ioctls_arch.h
113+
LC_COLLATE=C sort -u ioctls_hex.h ioctls_sym.h >> ioctls_arch.h
114114
msg "generated $(grep -c '^{' ioctls_arch.h) ioctls from $arch_dir"

maint/ioctls_hex.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,4 @@ for f; do
4646
done |
4747
sed 's|^uapi/||' |
4848
sed -n 's/^\([^:]*\):'"$regexp"'.*/{ "\1", "\2", 0, \3, 0 },/p' |
49-
sort -u
49+
LC_COLLATE=C sort -u

maint/ioctls_sym.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ find . -type f -name '*.h' -print0 |
7878
exit 0
7979
cd - > /dev/null
8080
sed 's|^\./\(uapi/\)\?||' < "$tmpdir"/headers1.list > "$tmpdir"/headers.list
81-
sort -u -o "$tmpdir"/headers.list "$tmpdir"/headers.list
81+
LC_COLLATE=C sort -u -o "$tmpdir"/headers.list "$tmpdir"/headers.list
8282

8383
msg "processing $(wc -l < "$tmpdir"/headers.list) header files from $inc_dir"
8484
failed=0

0 commit comments

Comments
 (0)