summaryrefslogtreecommitdiff
path: root/linux/net/ipsec/alg/scripts/mk-static_init.c.sh
blob: 8a17c670e5010af92e12b721b7db66ad5fd75f6b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh
cat << EOF
#include <linux/kernel.h>
#include <linux/list.h>
#include "freeswan/ipsec_alg.h"
$(for i in $*; do
	test -z "$i" && continue
	echo "extern int $i(void);"
done)
void ipsec_alg_static_init(void){ 
	int __attribute__ ((unused)) err=0;
$(for i in $*; do
	test -z "$i" && continue
	echo "	if ((err=$i()) < 0)"
	echo "		printk(KERN_WARNING \"$i() returned %d\", err);"
done)
}
EOF