From: Zbigniew Jędrzejewski-Szmek Date: Mon, 8 Mar 2021 11:39:50 +0000 (+0100) Subject: missing-syscalls: do not generate trailing empty line X-Git-Tag: v248-rc3~29^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1d73ffeae1f4a8a93c3590a15560becfb4a2fc31;p=thirdparty%2Fsystemd.git missing-syscalls: do not generate trailing empty line The generated .h file was already like this, but what the generator generated did not match. So we only need to update the generator. --- diff --git a/src/basic/missing_syscalls.py b/src/basic/missing_syscalls.py index 650f62d1d4f..550be48cf4d 100644 --- a/src/basic/missing_syscalls.py +++ b/src/basic/missing_syscalls.py @@ -37,7 +37,7 @@ def parse_syscall_tables(filenames): return {filename.split('-')[-1][:-4]: parse_syscall_table(filename) for filename in filenames} -DEF_TEMPLATE = '''\ +DEF_TEMPLATE = ''' #ifndef __IGNORE_{syscall} # if defined(__aarch64__) # define systemd_NR_{syscall} {nr_arm64} @@ -99,13 +99,13 @@ def print_syscall_def(syscall, tables, out): mappings = {f'nr_{arch}':t.get(syscall, -1) for arch, t in tables.items()} print(DEF_TEMPLATE.format(syscall=syscall, **mappings), - file=out) + file=out, end='') def print_syscall_defs(syscalls, tables, out): print('''\ /* SPDX-License-Identifier: LGPL-2.1-or-later * This file is generated. Do not edit! */ -''' , file=out) +''' , file=out, end='') for syscall in syscalls: print_syscall_def(syscall, tables, out)