Skip to content

Commit

Permalink
Remove cleanup.c inclusion from syscalls generation
Browse files Browse the repository at this point in the history
Remove cleanup.c from syscalls.h as it is part of the old library and
its usage is discouraged. LSP(s) supporting C language correctly flag
this file as problematic. This patch ensures that the lapi/syscalls/regen.sh
script will no longer include cleanup.c, preventing unnecessary usage in
generated headers.

Signed-off-by: Andrea Cervesato <[email protected]>
Reviewed-by: Cyril Hrubis <[email protected]>
  • Loading branch information
acerv committed Sep 10, 2024
1 parent 7210022 commit 2ad3542
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 49 deletions.
5 changes: 3 additions & 2 deletions include/lapi/syscalls/regen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,17 @@ cat << EOF > "${output_pid}"
#include <errno.h>
#include <sys/syscall.h>
#include <asm/unistd.h>
#include "cleanup.c"
#ifdef TST_TEST_H__
#define TST_SYSCALL_BRK__(NR, SNR) ({ \\
tst_brk(TCONF, \\
"syscall(%d) " SNR " not supported on your arch", NR); \\
})
#else
inline static void dummy_cleanup(void) {}
#define TST_SYSCALL_BRK__(NR, SNR) ({ \\
tst_brkm(TCONF, CLEANUP, \\
tst_brkm(TCONF, dummy_cleanup, \\
"syscall(%d) " SNR " not supported on your arch", NR); \\
})
#endif
Expand Down
47 changes: 0 additions & 47 deletions include/old/cleanup.c

This file was deleted.

0 comments on commit 2ad3542

Please sign in to comment.