diff --git a/sys/kern/kern_module.c b/sys/kern/kern_module.c index d17eda57bb59..c8c42bce68d7 100644 --- a/sys/kern/kern_module.c +++ b/sys/kern/kern_module.c @@ -1,4 +1,4 @@ -/* $NetBSD: kern_module.c,v 1.66 2010/05/24 03:50:25 pgoyette Exp $ */ +/* $NetBSD: kern_module.c,v 1.67 2010/05/24 15:34:48 pgoyette Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_module.c,v 1.66 2010/05/24 03:50:25 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_module.c,v 1.67 2010/05/24 15:34:48 pgoyette Exp $"); #define _MODULE_INTERNAL @@ -97,26 +97,6 @@ static void module_enqueue(module_t *); static bool module_merge_dicts(prop_dictionary_t, const prop_dictionary_t); -int module_eopnotsupp(const char *, int, bool, module_t *, - prop_dictionary_t *); - -int (*module_load_vfs_vec)(const char *, int, bool, module_t *, - prop_dictionary_t *); - -int -module_eopnotsupp(const char *name, int flags, bool autoload, module_t *mod, - prop_dictionary_t *filedictp) -{ - return EOPNOTSUPP; -} -__weak_alias(module_load_vfs,module_eopnotsupp); - -void -module_load_vfs_init(void) -{ - module_load_vfs_vec = module_load_vfs; -} - /* * module_error: * @@ -324,7 +304,6 @@ module_init(void) mutex_init(&module_lock, MUTEX_DEFAULT, IPL_NONE); cv_init(&module_thread_cv, "modunload"); mutex_init(&module_thread_lock, MUTEX_DEFAULT, IPL_NONE); - module_load_vfs_vec = module_eopnotsupp; #ifdef MODULAR /* XXX */ module_init_md(); @@ -858,8 +837,8 @@ module_do_load(const char *name, bool isdep, int flags, return ENOMEM; } - error = (*module_load_vfs_vec)(name, flags, autoload, mod, - &filedict); + error = module_load_vfs_vec(name, flags, autoload, mod, + &filedict); if (error != 0) { kmem_free(mod, sizeof(*mod)); depth--; diff --git a/sys/kern/kern_module_vfs.c b/sys/kern/kern_module_vfs.c index 7e0aa1b7be71..a7c76f46f133 100644 --- a/sys/kern/kern_module_vfs.c +++ b/sys/kern/kern_module_vfs.c @@ -1,4 +1,4 @@ -/* $NetBSD: kern_module_vfs.c,v 1.4 2010/04/04 17:18:04 jnemeth Exp $ */ +/* $NetBSD: kern_module_vfs.c,v 1.5 2010/05/24 15:34:49 pgoyette Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_module_vfs.c,v 1.4 2010/04/04 17:18:04 jnemeth Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_module_vfs.c,v 1.5 2010/05/24 15:34:49 pgoyette Exp $"); #define _MODULE_INTERNAL #include @@ -51,6 +51,14 @@ __KERNEL_RCSID(0, "$NetBSD: kern_module_vfs.c,v 1.4 2010/04/04 17:18:04 jnemeth static int module_load_plist_vfs(const char *, const bool, prop_dictionary_t *); +int (*module_load_vfs_vec)(const char *, int, bool, module_t *, + prop_dictionary_t *) = (void *)eopnotsupp; + +void +module_load_vfs_init(void) +{ + module_load_vfs_vec = module_load_vfs; +} int module_load_vfs(const char *name, int flags, bool autoload,