param_key: fix container of when no struct member is referenced
[smatch.git] / smatch_scripts / gen_trinity.sh
blobc8e84f04c61f2eea45b85bfac47a3841a01cde03
1 #!/bin/bash
3 cat << EOF > trinity_smatch.h
5 #pragma once
7 /* Syscalls from arch/x86/syscalls/syscall_64.tbl */
9 #include "sanitise.h"
10 #include "syscall.h"
11 #include "syscalls/syscalls.h"
13 EOF
15 cat smatch_trinity_* >> trinity_smatch.c
18 for i in $(grep syscallentry smatch_trinity_* | cut -d ' ' -f 3) ; do
19 echo "extern struct syscallentry $i;" >> trinity_smatch.h
20 done
22 echo "" >> trinity_smatch.h
23 echo "struct syscalltable syscalls_smatch[] = {" >> trinity_smatch.h
25 for i in $(grep syscallentry smatch_trinity_* | cut -d ' ' -f 3) ; do
26 echo "{ .entry = &$i }," >> trinity_smatch.h
27 done
29 echo "};" >> trinity_smatch.h