From 4a5ed8364c4ef15308e71724d4ea2bdcd5ae228f Mon Sep 17 00:00:00 2001 From: pierretom Date: Mon, 20 Apr 2026 20:13:35 +0200 Subject: [PATCH] remove trailing spaces in `etc/templates/new_syscalls.txt` Trailing spaces are added after the second column, even if the third column is empty, let's fix it. --- src/tools/gen-syscalls.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/tools/gen-syscalls.sh b/src/tools/gen-syscalls.sh index 245c8a40d..f7901c0ad 100755 --- a/src/tools/gen-syscalls.sh +++ b/src/tools/gen-syscalls.sh @@ -216,7 +216,12 @@ function gen_new_syscalls() echo "▶ $header" >> "$NEW_SYSCALLS_FILE" syscalls_block=$(extract_block "$ALL_SYSCALLS" "$header") - syscalls_block=$(echo "$syscalls_block" | awk '{printf "%-5s %-32s %s\n", $1, $2, $3}' | sort -n) + syscalls_block=$( + echo "$syscalls_block" | + awk '{printf "%-5s %-32s %s\n", $1, $2, $3}' | # Align columns. + sed 's/[[:space:]]*$//' | # Remove all trailing spaces. + sort -n + ) syscalls_names=$(echo "$syscalls_block" | awk '{print $2}') if [[ ! -f "$old_header" ]] # If the header does not exist in the old directory, add all syscalls.