Statistics
| Branch: | Tag: | Revision:

root / xseg / tools / create_initializer @ 6e0a3771

History | View | Annotate | Download (323 Bytes)

1
#!/bin/bash
2

    
3
for driver in $*; do
4
	echo -ne "int ${driver}_init(void);\n"
5
done
6

    
7
echo -ne "\n"
8
echo -ne "int __xseg_preinit(void)\n"
9
echo -ne "{\n"
10
echo -ne "	int r;\n"
11

    
12
for driver in $*; do
13
	echo -ne "	if ((r = ${driver}_init()))\n"
14
	echo -ne "		goto out;\n"
15
done
16

    
17
echo -ne "out:\n"
18
echo -ne "	return r;\n"
19
echo -ne "}\n"
20