patch-2.1.29 linux/arch/sparc/kernel/check_asm.sh

Next file: linux/arch/sparc/kernel/devices.c
Previous file: linux/arch/sparc/kernel/auxio.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.28/linux/arch/sparc/kernel/check_asm.sh linux/arch/sparc/kernel/check_asm.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+sed -n -e '/struct[ 	]*'$1'_struct[ 	]*{/,/};/p' < $2 | sed '/struct[ 	]*'$1'_struct[ 	]*{/d;/:[0-9]*[ 	]*;/d;/^[ 	]*$/d;/};/d;s/^[ 	]*//;s/volatile[ 	]*//;s/\(unsigned\|signed\|struct\)[ 	]*//;s/\(\[\|__attribute__\).*;[ 	]*$//;s/;[ 	]*$//;s/^[^ 	]*[ 	]*//;s/,/\
+/g' | sed 's/^[ 	*]*//;s/[ 	]*$//;s/^.*$/printf ("#define AOFF_'$1'_\0	0x%08x\\n#define ASIZ_'$1'_\0	0x%08x\\n", ((char *)\&_'$1'.\0) - ((char *)\&_'$1'), sizeof(_'$1'.\0));/' >> $3

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov