Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern Clean up kern_module.c rev 1.66, thanks to pooka@ f...



details:   https://anonhg.NetBSD.org/src/rev/90b541cd68f8
branches:  trunk
changeset: 755156:90b541cd68f8
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Mon May 24 15:34:48 2010 +0000

description:
Clean up kern_module.c rev 1.66, thanks to pooka@ for review & suggestions

diffstat:

 sys/kern/kern_module.c     |  29 ++++-------------------------
 sys/kern/kern_module_vfs.c |  12 ++++++++++--
 2 files changed, 14 insertions(+), 27 deletions(-)

diffs (97 lines):

diff -r f2a8305aa2d0 -r 90b541cd68f8 sys/kern/kern_module.c
--- a/sys/kern/kern_module.c    Mon May 24 14:04:04 2010 +0000
+++ b/sys/kern/kern_module.c    Mon May 24 15:34:48 2010 +0000
@@ -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 <sys/cdefs.h>
-__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 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 @@
        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 @@
                        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 -r f2a8305aa2d0 -r 90b541cd68f8 sys/kern/kern_module_vfs.c
--- a/sys/kern/kern_module_vfs.c        Mon May 24 14:04:04 2010 +0000
+++ b/sys/kern/kern_module_vfs.c        Mon May 24 15:34:48 2010 +0000
@@ -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 <sys/cdefs.h>
-__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 <sys/param.h>
@@ -51,6 +51,14 @@
 
 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,



Home | Main Index | Thread Index | Old Index