strace/generate_sen.sh
Elvira Khabirova 28e32df56f Add unique syscall entry numbers (SENs)
* Makefile.am (BUILT_SOURCES, CLEANFILES): Add sen.h.
(syscallent_names, syscallent_patterns, syscallent_files): New variables.
(sen.h): New rule.
* defs.h (struct sysent): Add sen field.
* generate_sen.sh: New file.
* linux/syscall.h: Include "sen.h".
* syscall.c (SEN_NAME): New temporary macro.
(SEN): Use it to prepend syscall entry number.
2015-07-12 22:31:49 +00:00

9 lines
155 B
Bash
Executable File

#!/bin/sh -e
echo 'enum {'
echo 'SEN_printargs = 0,'
sed -n '/printargs/! s/.*SEN(\([^)]*\)).*/\1/p' |
sort -u |
sed 's/.*/SEN_&,/'
echo '};'