Found something easier: syscallent.sh ( similar to used by strace ) --------------------------------------------------------- cat ${1+"$@"} | sed -n 's/^#[ ]*define[ ][ ]*SYS_\([^ ]*\)[ ]*[^0-9]*\([0-9]*\).*$/\1 \2/p s/^#[ ]*define[ ][ ]*__NR_\([^ ]*\)[ ]*[^0-9]*\([0-9]*\).*$/\1 \2/p s/^#[ ]*define[ ][ ]*__NR_\([^ ]*\)[ ]*[^0-9()]*(__NR_Linux + \([0-9]*\))$/\1 \2/p' | sort -k2n | uniq | awk ' BEGIN { h = "#ifndef _H_SYSCALLENT\n#define _H_SYSCALLENT\nchar *syscalls[] = { " print h } { s = "\"" $1 "\"," print s } END { f = " };\n#endif" print f } ' --------------------------------------------------------- This creates header file: #ifndef _H_SYSCALLENT #define _H_SYSCALLENT char *syscalls[] = { "read", "write", "open", "close", "stat", "fstat", "lstat", "poll", "lseek", "mmap", ...... ..... ... } #endif --------------------------------------------------------- included in makefile: ARCH := $(shell getconf LONG_BIT) ifeq ($(ARCH),64) ./syscallent.sh /usr/include/asm/unistd_64.h > $(INCDIR)/syscallent.h else ./syscallent.sh /usr/include/asm/unistd_32.h > $(INCDIR)/syscallent.h endif --------------------------------------------------------- Works fine for me. Just want to know if this will be portable method and won't produce wrong result in any case.? _______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies