Trust uboot's device list only if it does not look suspicious.
[AROS.git] / compiler / autoinit / functions.c
blob5bb4ed8ccb88cb610e76b9b950489682b0ca223e
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: autoinit library - functions sets handling
6 Lang: english
7 */
9 #define DEBUG 0
11 #include <aros/symbolsets.h>
12 #include <aros/debug.h>
14 int _set_call_funcs(const void * const set[], int direction, int test_fail, struct ExecBase *SysBase)
16 int pos, (*func)(struct ExecBase *SysBase);
18 D(bug("entering set_call_funcs() - %p\n", set));
20 ForeachElementInSet(set, direction, pos, func)
22 D(bug(" %p[%d] %p()", set, pos, func));
24 if (test_fail)
26 int ret = (*func)(SysBase);
27 D(bug(" => %d", ret));
28 if (!ret)
29 return 0;
31 else
33 (void)(*func)(SysBase);
35 D(bug("\n"));
38 return 1;