- Give PCI controllers lower unit numbers than legacy controllers.
[cake.git] / rom / exec / findresident.c
blob2a92f6b52cf545702f4d4c790fb386ca84692577
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Search a resident module by name
6 Lang: english
7 */
8 #include "exec_intern.h"
9 #include <string.h>
10 #include <exec/resident.h>
11 #include <proto/exec.h>
13 /*****************************************************************************
15 NAME */
17 AROS_LH1(struct Resident *, FindResident,
19 /* SYNOPSIS */
20 AROS_LHA(const UBYTE *, name, A1),
22 /* LOCATION */
23 struct ExecBase *, SysBase, 16, Exec)
25 /* FUNCTION
26 Search for a Resident module in the system resident list.
28 INPUTS
29 name - pointer to the name of a Resident module to find
31 RESULT
32 pointer to the Resident module (struct Resident *), or null if
33 not found.
35 NOTES
37 EXAMPLE
39 BUGS
41 SEE ALSO
43 INTERNALS
45 *****************************************************************************/
47 AROS_LIBFUNC_INIT
49 IPTR *list;
51 list = SysBase->ResModules;
53 if(list)
55 while(*list)
58 If bit 31 is set, this doesn't point to a Resident module, but
59 to another list of modules.
61 if(*list & 0x80000000) list = (IPTR *)(*list & 0x7fffffff);
63 if(!(strcmp( ((struct Resident *)*list)->rt_Name, name)) )
65 return (struct Resident *)*list;
68 list++;
72 return NULL;
73 AROS_LIBFUNC_EXIT
74 } /* FindResident */