Rename a few routines from _file() to _vfs() for consistency.

Ride 5.99.24 bump.
This commit is contained in:
pooka 2010-01-19 22:17:44 +00:00
parent 4b28eb9460
commit f32c83c1bd
3 changed files with 20 additions and 20 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_module_vfs.c,v 1.1 2009/11/18 17:40:45 pooka Exp $ */
/* $NetBSD: kern_module_vfs.c,v 1.2 2010/01/19 22:17:44 pooka 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.1 2009/11/18 17:40:45 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: kern_module_vfs.c,v 1.2 2010/01/19 22:17:44 pooka Exp $");
#define _MODULE_INTERNAL
#include <sys/param.h>
@ -49,8 +49,8 @@ __KERNEL_RCSID(0, "$NetBSD: kern_module_vfs.c,v 1.1 2009/11/18 17:40:45 pooka Ex
#include <prop/proplib.h>
static int module_load_plist_file(const char *, const bool,
prop_dictionary_t *);
static int module_load_plist_vfs(const char *, const bool,
prop_dictionary_t *);
int
module_load_vfs(const char *name, int flags, bool autoload,
@ -70,13 +70,13 @@ module_load_vfs(const char *name, int flags, bool autoload,
if (!autoload) {
nochroot = false;
snprintf(path, MAXPATHLEN, "%s", name);
error = kobj_load_file(&mod->mod_kobj, path, nochroot);
error = kobj_load_vfs(&mod->mod_kobj, path, nochroot);
}
if (autoload || (error == ENOENT)) {
nochroot = true;
snprintf(path, MAXPATHLEN, "%s/%s/%s.kmod",
module_base, name, name);
error = kobj_load_file(&mod->mod_kobj, path, nochroot);
error = kobj_load_vfs(&mod->mod_kobj, path, nochroot);
}
if (error != 0) {
PNBUF_PUT(path);
@ -94,7 +94,7 @@ module_load_vfs(const char *name, int flags, bool autoload,
* Load and process <module>.prop if it exists.
*/
if ((flags & MODCTL_NO_PROP) == 0 && filedictp) {
error = module_load_plist_file(path, nochroot, filedictp);
error = module_load_plist_vfs(path, nochroot, filedictp);
if (error != 0) {
module_print("plist load returned error %d for `%s'",
error, path);
@ -113,12 +113,12 @@ module_load_vfs(const char *name, int flags, bool autoload,
}
/*
* module_load_plist_file:
* module_load_plist_vfs:
*
* Load a plist located in the file system into memory.
*/
static int
module_load_plist_file(const char *modpath, const bool nochroot,
module_load_plist_vfs(const char *modpath, const bool nochroot,
prop_dictionary_t *filedictp)
{
struct nameidata nd;

View File

@ -1,4 +1,4 @@
/* $NetBSD: subr_kobj_vfs.c,v 1.1 2009/11/27 17:54:11 pooka Exp $ */
/* $NetBSD: subr_kobj_vfs.c,v 1.2 2010/01/19 22:17:44 pooka Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@ -72,10 +72,10 @@
#include <sys/vnode.h>
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: subr_kobj_vfs.c,v 1.1 2009/11/27 17:54:11 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: subr_kobj_vfs.c,v 1.2 2010/01/19 22:17:44 pooka Exp $");
static void
kobj_close_file(kobj_t ko)
kobj_close_vfs(kobj_t ko)
{
VOP_UNLOCK(ko->ko_source, 0);
@ -88,7 +88,7 @@ kobj_close_file(kobj_t ko)
* Utility function: read from the object.
*/
static int
kobj_read_file(kobj_t ko, void **basep, size_t size, off_t off,
kobj_read_vfs(kobj_t ko, void **basep, size_t size, off_t off,
bool allocate)
{
size_t resid;
@ -126,12 +126,12 @@ kobj_read_file(kobj_t ko, void **basep, size_t size, off_t off,
}
/*
* kobj_load_file:
* kobj_load_vfs:
*
* Load an object located in the file system.
*/
int
kobj_load_file(kobj_t *kop, const char *path, const bool nochroot)
kobj_load_vfs(kobj_t *kop, const char *path, const bool nochroot)
{
struct nameidata nd;
kauth_cred_t cred;
@ -156,8 +156,8 @@ kobj_load_file(kobj_t *kop, const char *path, const bool nochroot)
ko->ko_type = KT_VNODE;
ko->ko_source = nd.ni_vp;
ko->ko_read = kobj_read_file;
ko->ko_close = kobj_close_file;
ko->ko_read = kobj_read_vfs;
ko->ko_close = kobj_close_vfs;
*kop = ko;
return kobj_load(ko);
@ -166,7 +166,7 @@ kobj_load_file(kobj_t *kop, const char *path, const bool nochroot)
#else /* MODULAR */
int
kobj_load_file(kobj_t *kop, const char *path, const bool nochroot)
kobj_load_vfs(kobj_t *kop, const char *path, const bool nochroot)
{
return ENOSYS;

View File

@ -1,4 +1,4 @@
/* $NetBSD: kobj.h,v 1.12 2009/06/17 21:04:25 dyoung Exp $ */
/* $NetBSD: kobj.h,v 1.13 2010/01/19 22:17:45 pooka Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@ -32,7 +32,7 @@
typedef struct kobj *kobj_t;
/* External interface. */
int kobj_load_file(kobj_t *, const char *, const bool);
int kobj_load_vfs(kobj_t *, const char *, const bool);
int kobj_load_mem(kobj_t *, void *, ssize_t);
int kobj_affix(kobj_t, const char *);
void kobj_unload(kobj_t);