make a couple functions static...
also change module_register_static to module_register_init as this function initalizes the module for both dynamic and static modules...
This commit is contained in:
parent
a9ce7114bd
commit
70eb687af4
@ -23,7 +23,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: kern_module.c,v 1.1 1997/05/07 16:05:31 dfr Exp $
|
||||
* $Id: kern_module.c,v 1.2 1997/08/02 14:31:33 bde Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -77,13 +77,13 @@ module_shutdown(int arg1, void* arg2)
|
||||
}
|
||||
|
||||
void
|
||||
module_register_static(void *arg)
|
||||
module_register_init(void *arg)
|
||||
{
|
||||
moduledata_t* data = (moduledata_t*) arg;
|
||||
int error;
|
||||
|
||||
if (error = module_register(data->name, data->evhand, data->priv))
|
||||
printf("module_register_static: module_register(%s, %x, %x) returned %d",
|
||||
printf("module_register_init: module_register(%s, %x, %x) returned %d",
|
||||
data->name, data->evhand, data->priv, error);
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: link_aout.c,v 1.1 1997/05/07 16:05:32 dfr Exp $
|
||||
* $Id: link_aout.c,v 1.2 1997/08/02 14:31:35 bde Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -97,7 +97,7 @@ link_aout_init(void* arg)
|
||||
|
||||
SYSINIT(link_aout, SI_SUB_KMEM, SI_ORDER_THIRD, link_aout_init, 0);
|
||||
|
||||
int
|
||||
static int
|
||||
link_aout_load_file(const char* filename, linker_file_t* result)
|
||||
{
|
||||
struct nameidata nd;
|
||||
@ -180,7 +180,7 @@ link_aout_load_file(const char* filename, linker_file_t* result)
|
||||
return error;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
link_aout_unload(linker_file_t file)
|
||||
{
|
||||
aout_file_t af = file->priv;
|
||||
|
@ -23,7 +23,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id$
|
||||
* $Id: module.h,v 1.1 1997/05/07 16:05:45 dfr Exp $
|
||||
*/
|
||||
|
||||
#ifndef _SYS_MODULE_H_
|
||||
@ -52,9 +52,9 @@ typedef struct moduledata {
|
||||
} moduledata_t;
|
||||
|
||||
#define DECLARE_MODULE(name, data, sub, order) \
|
||||
SYSINIT(name##module, sub, order, module_register_static, &data)
|
||||
SYSINIT(name##module, sub, order, module_register_init, &data)
|
||||
|
||||
void module_register_static(void *data);
|
||||
void module_register_init(void *data);
|
||||
int module_register(const char *name, modeventhand_t callback, void *arg);
|
||||
module_t module_lookupbyname(const char *name);
|
||||
module_t module_lookupbyid(int modid);
|
||||
|
Loading…
Reference in New Issue
Block a user