Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Rename a few routines from _file() to _vfs() for consist...
details: https://anonhg.NetBSD.org/src/rev/1427659fffd5
branches: trunk
changeset: 750950:1427659fffd5
user: pooka <pooka%NetBSD.org@localhost>
date: Tue Jan 19 22:17:44 2010 +0000
description:
Rename a few routines from _file() to _vfs() for consistency.
Ride 5.99.24 bump.
diffstat:
sys/kern/kern_module_vfs.c | 18 +++++++++---------
sys/kern/subr_kobj_vfs.c | 18 +++++++++---------
sys/sys/kobj.h | 4 ++--
3 files changed, 20 insertions(+), 20 deletions(-)
diffs (153 lines):
diff -r 882075a77f8c -r 1427659fffd5 sys/kern/kern_module_vfs.c
--- a/sys/kern/kern_module_vfs.c Tue Jan 19 22:12:00 2010 +0000
+++ b/sys/kern/kern_module_vfs.c Tue Jan 19 22:17:44 2010 +0000
@@ -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 @@
#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 @@
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 @@
* 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_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;
diff -r 882075a77f8c -r 1427659fffd5 sys/kern/subr_kobj_vfs.c
--- a/sys/kern/subr_kobj_vfs.c Tue Jan 19 22:12:00 2010 +0000
+++ b/sys/kern/subr_kobj_vfs.c Tue Jan 19 22:17:44 2010 +0000
@@ -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 @@
* 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_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 @@
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 @@
#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;
diff -r 882075a77f8c -r 1427659fffd5 sys/sys/kobj.h
--- a/sys/sys/kobj.h Tue Jan 19 22:12:00 2010 +0000
+++ b/sys/sys/kobj.h Tue Jan 19 22:17:44 2010 +0000
@@ -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);
Home |
Main Index |
Thread Index |
Old Index