[PATCH] maint/ioctls_gen.sh: avoid effects of locale when sorting files
Dmitry V. Levin
ldv at altlinux.org
Tue May 19 23:27:23 UTC 2015
On Wed, Apr 22, 2015 at 10:52:09AM +0200, Philippe De Muyter wrote:
> Signed-off-by: Philippe De Muyter <phdm at macqel.be>
> ---
> maint/ioctls_gen.sh | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/maint/ioctls_gen.sh b/maint/ioctls_gen.sh
> index d8da875..56c03d8 100755
> --- a/maint/ioctls_gen.sh
> +++ b/maint/ioctls_gen.sh
> @@ -90,6 +90,7 @@ msg "generated $(grep -c '^{' ioctls_sym.h) symbolic ioctls from $inc_dir"
>
> # Output all ioctl definitions fetched from include-directory.
> echo "/* Generated by $me from definitions found in ${inc_dir%%/}/ tree. */" > ioctls_inc.h
> +export LC_ALL=C
> sort -u ioctls_hex.h ioctls_sym.h >> ioctls_inc.h
> msg "generated $(grep -c '^{' ioctls_inc.h) ioctls from $inc_dir"
>
> @@ -110,5 +111,6 @@ msg "generated $(grep -c '^{' ioctls_sym.h) symbolic ioctls from $arch_dir"
>
> # Output all ioctl definitions fetched from arch-include-directory.
> echo "/* Generated by $me from definitions found in ${arch_dir%%/}/ tree. */" > ioctls_arch.h
> +export LC_ALL=C
> sort -u ioctls_hex.h ioctls_sym.h >> ioctls_arch.h
> msg "generated $(grep -c '^{' ioctls_arch.h) ioctls from $arch_dir"
There is no need to export LC_ALL twice. I've applied a slightly
different patch that just sets LC_COLLATE for sort invocations.
--
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20150520/4bdd2a0e/attachment.bin>
More information about the Strace-devel
mailing list