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.
This commit is contained in:
pierretom 2026-04-20 20:13:35 +02:00
parent a4e6495fd1
commit 4a5ed8364c

View file

@ -216,7 +216,12 @@ function gen_new_syscalls()
echo "$header" >> "$NEW_SYSCALLS_FILE" echo "$header" >> "$NEW_SYSCALLS_FILE"
syscalls_block=$(extract_block "$ALL_SYSCALLS" "$header") 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}') 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. if [[ ! -f "$old_header" ]] # If the header does not exist in the old directory, add all syscalls.