"rumppriv" goes back to "rump" per internal interface naming change.
This commit is contained in:
parent
a6f92a2b8f
commit
d09e2773d0
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: puffs_rumpglue.c,v 1.10 2009/10/14 17:29:19 pooka Exp $ */
|
||||
/* $NetBSD: puffs_rumpglue.c,v 1.11 2009/10/14 18:18:53 pooka Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2008 Antti Kantee. All Rights Reserved.
|
||||
|
@ -29,7 +29,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: puffs_rumpglue.c,v 1.10 2009/10/14 17:29:19 pooka Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: puffs_rumpglue.c,v 1.11 2009/10/14 18:18:53 pooka Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/conf.h>
|
||||
|
@ -163,7 +163,7 @@ writethread(void *arg)
|
|||
}
|
||||
|
||||
int
|
||||
rumppriv_syspuffs_glueinit(int fd, int *newfd)
|
||||
rump_syspuffs_glueinit(int fd, int *newfd)
|
||||
{
|
||||
struct ptargs *pap;
|
||||
int rv;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: rump.h,v 1.31 2009/10/14 17:29:19 pooka Exp $ */
|
||||
/* $NetBSD: rump.h,v 1.32 2009/10/14 18:18:53 pooka Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Antti Kantee. All Rights Reserved.
|
||||
|
@ -65,10 +65,6 @@ struct modinfo;
|
|||
/* rumpkern */
|
||||
enum rump_uiorw { RUMPUIO_READ, RUMPUIO_WRITE };
|
||||
typedef int (*rump_sysproxy_t)(int, void *, uint8_t *, size_t, register_t *);
|
||||
#define rump_cred_suserput(c) rump_cred_put(c)
|
||||
/* COMPAT_NETHACK */
|
||||
#define WizardMode() rump_cred_suserget()
|
||||
#define YASD(cred) rump_cred_suserput(cred)
|
||||
|
||||
/* rumpvfs */
|
||||
#define RUMPCN_FREECRED 0x02
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: rumpcpu.c,v 1.4 2009/10/14 17:29:19 pooka Exp $ */
|
||||
/* $NetBSD: rumpcpu.c,v 1.5 2009/10/14 18:18:53 pooka Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2008 Antti Kantee. All Rights Reserved.
|
||||
|
@ -29,7 +29,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: rumpcpu.c,v 1.4 2009/10/14 17:29:19 pooka Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: rumpcpu.c,v 1.5 2009/10/14 18:18:53 pooka Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
|
||||
|
@ -50,7 +50,7 @@ struct lwp *
|
|||
x86_curlwp()
|
||||
{
|
||||
|
||||
return rumppriv_get_curlwp();
|
||||
return rump_get_curlwp();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: emul.c,v 1.99 2009/10/14 17:29:19 pooka Exp $ */
|
||||
/* $NetBSD: emul.c,v 1.100 2009/10/14 18:18:53 pooka Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Antti Kantee. All Rights Reserved.
|
||||
|
@ -28,7 +28,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.99 2009/10/14 17:29:19 pooka Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.100 2009/10/14 18:18:53 pooka Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/malloc.h>
|
||||
|
@ -439,7 +439,7 @@ kthread_create(pri_t pri, int flags, struct cpu_info *ci,
|
|||
k = kmem_alloc(sizeof(struct kthdesc), KM_SLEEP);
|
||||
k->f = func;
|
||||
k->arg = arg;
|
||||
k->mylwp = l = rumppriv_setup_curlwp(0, rump_nextlid(), 0);
|
||||
k->mylwp = l = rump_setup_curlwp(0, rump_nextlid(), 0);
|
||||
if (flags & KTHREAD_MPSAFE)
|
||||
l->l_pflag |= LP_MPSAFE;
|
||||
rv = rumpuser_thread_create(threadbouncer, k, thrname);
|
||||
|
@ -457,7 +457,7 @@ kthread_exit(int ecode)
|
|||
|
||||
if ((curlwp->l_pflag & LP_MPSAFE) == 0)
|
||||
KERNEL_UNLOCK_ONE(NULL);
|
||||
rumppriv_clear_curlwp();
|
||||
rump_clear_curlwp();
|
||||
rumpuser_thread_exit();
|
||||
}
|
||||
|
||||
|
@ -731,7 +731,7 @@ void
|
|||
cpu_reboot(int howto, char *bootstr)
|
||||
{
|
||||
|
||||
rumppriv_reboot(howto);
|
||||
rump_reboot(howto);
|
||||
|
||||
/* this function is __dead, we must exit */
|
||||
rumpuser_exit(0);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: rump.c,v 1.122 2009/10/14 17:29:19 pooka Exp $ */
|
||||
/* $NetBSD: rump.c,v 1.123 2009/10/14 18:18:53 pooka Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Antti Kantee. All Rights Reserved.
|
||||
|
@ -28,7 +28,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.122 2009/10/14 17:29:19 pooka Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.123 2009/10/14 18:18:53 pooka Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/atomic.h>
|
||||
|
@ -226,7 +226,7 @@ rump__init(int rump_version)
|
|||
loginit();
|
||||
|
||||
kauth_init();
|
||||
rump_susercred = rumppriv_cred_create(0, 0, 0, NULL);
|
||||
rump_susercred = rump_cred_create(0, 0, 0, NULL);
|
||||
|
||||
l = &lwp0;
|
||||
p = &proc0;
|
||||
|
@ -238,7 +238,7 @@ rump__init(int rump_version)
|
|||
p->p_vmspace = &rump_vmspace;
|
||||
p->p_emul = &emul_rump;
|
||||
p->p_lock = mutex_obj_alloc(MUTEX_DEFAULT, IPL_NONE);
|
||||
l->l_cred = rumppriv_cred_suserget();
|
||||
l->l_cred = rump_cred_suserget();
|
||||
l->l_proc = p;
|
||||
l->l_lid = 1;
|
||||
l->l_cpu = &rump_cpu;
|
||||
|
@ -297,7 +297,7 @@ rump__init(int rump_version)
|
|||
|
||||
/* maybe support sys_reboot some day for remote shutdown */
|
||||
void
|
||||
rumppriv_reboot(int howto)
|
||||
rump_reboot(int howto)
|
||||
{
|
||||
|
||||
/* dump means we really take the dive here */
|
||||
|
@ -324,7 +324,7 @@ rumppriv_reboot(int howto)
|
|||
}
|
||||
|
||||
struct uio *
|
||||
rumppriv_uio_setup(void *buf, size_t bufsize, off_t offset, enum rump_uiorw rw)
|
||||
rump_uio_setup(void *buf, size_t bufsize, off_t offset, enum rump_uiorw rw)
|
||||
{
|
||||
struct uio *uio;
|
||||
enum uio_rw uiorw;
|
||||
|
@ -356,21 +356,21 @@ rumppriv_uio_setup(void *buf, size_t bufsize, off_t offset, enum rump_uiorw rw)
|
|||
}
|
||||
|
||||
size_t
|
||||
rumppriv_uio_getresid(struct uio *uio)
|
||||
rump_uio_getresid(struct uio *uio)
|
||||
{
|
||||
|
||||
return uio->uio_resid;
|
||||
}
|
||||
|
||||
off_t
|
||||
rumppriv_uio_getoff(struct uio *uio)
|
||||
rump_uio_getoff(struct uio *uio)
|
||||
{
|
||||
|
||||
return uio->uio_offset;
|
||||
}
|
||||
|
||||
size_t
|
||||
rumppriv_uio_free(struct uio *uio)
|
||||
rump_uio_free(struct uio *uio)
|
||||
{
|
||||
size_t resid;
|
||||
|
||||
|
@ -384,7 +384,7 @@ rumppriv_uio_free(struct uio *uio)
|
|||
/* public interface */
|
||||
static pid_t nextpid = 1;
|
||||
struct lwp *
|
||||
rumppriv_newproc_switch()
|
||||
rump_newproc_switch()
|
||||
{
|
||||
struct lwp *oldlwp = curlwp;
|
||||
pid_t mypid;
|
||||
|
@ -394,14 +394,14 @@ rumppriv_newproc_switch()
|
|||
mypid = atomic_inc_uint_nv(&nextpid);
|
||||
|
||||
rumpuser_set_curlwp(NULL);
|
||||
rumppriv_setup_curlwp(mypid, 0, 1);
|
||||
rump_setup_curlwp(mypid, 0, 1);
|
||||
|
||||
return oldlwp;
|
||||
}
|
||||
|
||||
/* rump private */
|
||||
struct lwp *
|
||||
rumppriv_setup_curlwp(pid_t pid, lwpid_t lid, int set)
|
||||
rump_setup_curlwp(pid_t pid, lwpid_t lid, int set)
|
||||
{
|
||||
struct lwp *l;
|
||||
struct proc *p;
|
||||
|
@ -420,7 +420,7 @@ rumppriv_setup_curlwp(pid_t pid, lwpid_t lid, int set)
|
|||
p = &proc0;
|
||||
}
|
||||
|
||||
l->l_cred = rumppriv_cred_suserget();
|
||||
l->l_cred = rump_cred_suserget();
|
||||
l->l_proc = p;
|
||||
l->l_lid = lid;
|
||||
l->l_fd = p->p_fd;
|
||||
|
@ -443,7 +443,7 @@ rump_set_vmspace(struct vmspace *vm)
|
|||
}
|
||||
|
||||
void
|
||||
rumppriv_clear_curlwp(void)
|
||||
rump_clear_curlwp(void)
|
||||
{
|
||||
struct lwp *l;
|
||||
struct proc *p;
|
||||
|
@ -454,7 +454,7 @@ rumppriv_clear_curlwp(void)
|
|||
mutex_obj_free(p->p_lock);
|
||||
fd_free();
|
||||
rump_proc_vfs_release(p);
|
||||
rumppriv_cred_put(l->l_cred);
|
||||
rump_cred_put(l->l_cred);
|
||||
kmem_free(p, sizeof(*p));
|
||||
}
|
||||
kmem_free(l, sizeof(*l));
|
||||
|
@ -462,7 +462,7 @@ rumppriv_clear_curlwp(void)
|
|||
}
|
||||
|
||||
struct lwp *
|
||||
rumppriv_get_curlwp(void)
|
||||
rump_get_curlwp(void)
|
||||
{
|
||||
struct lwp *l;
|
||||
|
||||
|
@ -474,7 +474,7 @@ rumppriv_get_curlwp(void)
|
|||
}
|
||||
|
||||
void
|
||||
rumppriv_set_curlwp(struct lwp *l)
|
||||
rump_set_curlwp(struct lwp *l)
|
||||
{
|
||||
|
||||
/* clear current */
|
||||
|
@ -484,7 +484,7 @@ rumppriv_set_curlwp(struct lwp *l)
|
|||
}
|
||||
|
||||
kauth_cred_t
|
||||
rumppriv_cred_create(uid_t uid, gid_t gid, size_t ngroups, gid_t *groups)
|
||||
rump_cred_create(uid_t uid, gid_t gid, size_t ngroups, gid_t *groups)
|
||||
{
|
||||
kauth_cred_t cred;
|
||||
int rv;
|
||||
|
@ -505,14 +505,14 @@ rumppriv_cred_create(uid_t uid, gid_t gid, size_t ngroups, gid_t *groups)
|
|||
}
|
||||
|
||||
void
|
||||
rumppriv_cred_put(kauth_cred_t cred)
|
||||
rump_cred_put(kauth_cred_t cred)
|
||||
{
|
||||
|
||||
kauth_cred_free(cred);
|
||||
}
|
||||
|
||||
kauth_cred_t
|
||||
rumppriv_cred_suserget(void)
|
||||
rump_cred_suserget(void)
|
||||
{
|
||||
|
||||
kauth_cred_hold(rump_susercred);
|
||||
|
@ -542,7 +542,7 @@ rump_nextlid(void)
|
|||
}
|
||||
|
||||
int
|
||||
rumppriv_module_init(struct modinfo *mi, prop_dictionary_t props)
|
||||
rump_module_init(struct modinfo *mi, prop_dictionary_t props)
|
||||
{
|
||||
int rv;
|
||||
|
||||
|
@ -557,7 +557,7 @@ rumppriv_module_init(struct modinfo *mi, prop_dictionary_t props)
|
|||
}
|
||||
|
||||
int
|
||||
rumppriv_module_fini(struct modinfo *mi)
|
||||
rump_module_fini(struct modinfo *mi)
|
||||
{
|
||||
int rv;
|
||||
|
||||
|
@ -569,7 +569,7 @@ rumppriv_module_fini(struct modinfo *mi)
|
|||
}
|
||||
|
||||
static int
|
||||
rumppriv_sysproxy_local(int num, void *arg, uint8_t *data, size_t dlen,
|
||||
rump_sysproxy_local(int num, void *arg, uint8_t *data, size_t dlen,
|
||||
register_t *retval)
|
||||
{
|
||||
struct lwp *l;
|
||||
|
@ -583,7 +583,7 @@ rumppriv_sysproxy_local(int num, void *arg, uint8_t *data, size_t dlen,
|
|||
return callp->sy_call(l, (void *)data, retval);
|
||||
}
|
||||
|
||||
rump_sysproxy_t rump_sysproxy = rumppriv_sysproxy_local;
|
||||
rump_sysproxy_t rump_sysproxy = rump_sysproxy_local;
|
||||
void *rump_sysproxy_arg;
|
||||
|
||||
/*
|
||||
|
@ -593,7 +593,7 @@ void *rump_sysproxy_arg;
|
|||
* set in stone.
|
||||
*/
|
||||
int
|
||||
rumppriv_sysproxy_set(rump_sysproxy_t proxy, void *arg)
|
||||
rump_sysproxy_set(rump_sysproxy_t proxy, void *arg)
|
||||
{
|
||||
|
||||
if (rump_sysproxy_arg)
|
||||
|
@ -606,7 +606,7 @@ rumppriv_sysproxy_set(rump_sysproxy_t proxy, void *arg)
|
|||
}
|
||||
|
||||
int
|
||||
rumppriv_getversion()
|
||||
rump_getversion()
|
||||
{
|
||||
|
||||
return __NetBSD_Version__;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sysproxy_socket.c,v 1.3 2009/10/14 17:29:19 pooka Exp $ */
|
||||
/* $NetBSD: sysproxy_socket.c,v 1.4 2009/10/14 18:18:53 pooka Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2009 Antti Kantee. All Rights Reserved.
|
||||
|
@ -28,7 +28,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: sysproxy_socket.c,v 1.3 2009/10/14 17:29:19 pooka Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: sysproxy_socket.c,v 1.4 2009/10/14 18:18:53 pooka Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/kernel.h>
|
||||
|
@ -386,14 +386,14 @@ handle_syscall(void *arg)
|
|||
}
|
||||
|
||||
callp = rump_sysent + req->rpc_sysnum;
|
||||
mylwp = rumppriv_newproc_switch();
|
||||
mylwp = rump_newproc_switch();
|
||||
rump_set_vmspace(&rump_sysproxy_vmspace);
|
||||
l = curlwp;
|
||||
|
||||
resp.rpc_retval = 0; /* default */
|
||||
resp.rpc_error = callp->sy_call(l, (void *)req->rpc_data,
|
||||
&resp.rpc_retval);
|
||||
rumppriv_clear_curlwp();
|
||||
rump_clear_curlwp();
|
||||
rumpuser_set_curlwp(mylwp);
|
||||
kmem_free(req, req->rpc_head.rpch_flen);
|
||||
|
||||
|
@ -575,7 +575,7 @@ rump_sysproxy_socket(int num, void *arg, uint8_t *data, size_t dlen,
|
|||
}
|
||||
|
||||
int
|
||||
rumppriv_sysproxy_socket_setup_client(int s)
|
||||
rump_sysproxy_socket_setup_client(int s)
|
||||
{
|
||||
int error;
|
||||
|
||||
|
@ -587,7 +587,7 @@ rumppriv_sysproxy_socket_setup_client(int s)
|
|||
mutex_init(&wrkmtx, MUTEX_DEFAULT, IPL_NONE);
|
||||
mutex_init(&sendmtx, MUTEX_DEFAULT, IPL_NONE);
|
||||
mutex_init(&recvmtx, MUTEX_DEFAULT, IPL_NONE);
|
||||
error = rumppriv_sysproxy_set(rump_sysproxy_socket,
|
||||
error = rump_sysproxy_set(rump_sysproxy_socket,
|
||||
(void *)(uintptr_t)s);
|
||||
/* XXX: handle */
|
||||
|
||||
|
@ -597,7 +597,7 @@ rumppriv_sysproxy_socket_setup_client(int s)
|
|||
}
|
||||
|
||||
int
|
||||
rumppriv_sysproxy_socket_setup_server(int s)
|
||||
rump_sysproxy_socket_setup_server(int s)
|
||||
{
|
||||
int error;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: rumpuser_dl.c,v 1.2 2009/10/08 00:34:54 pooka Exp $ */
|
||||
/* $NetBSD: rumpuser_dl.c,v 1.3 2009/10/14 18:18:53 pooka Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2009 Antti Kantee. All Rights Reserved.
|
||||
|
@ -30,7 +30,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: rumpuser_dl.c,v 1.2 2009/10/08 00:34:54 pooka Exp $");
|
||||
__RCSID("$NetBSD: rumpuser_dl.c,v 1.3 2009/10/14 18:18:53 pooka Exp $");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
|
@ -67,7 +67,7 @@ process(const char *soname)
|
|||
goto out;
|
||||
|
||||
for (; mi < mi_end; mi++)
|
||||
rump_module_init(*mi, NULL);
|
||||
rump_pub_module_init(*mi, NULL);
|
||||
assert(mi == mi_end);
|
||||
|
||||
out:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: compat.c,v 1.4 2009/10/14 17:29:20 pooka Exp $ */
|
||||
/* $NetBSD: compat.c,v 1.5 2009/10/14 18:18:53 pooka Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2009 Antti Kantee. All Rights Reserved.
|
||||
|
@ -28,7 +28,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: compat.c,v 1.4 2009/10/14 17:29:20 pooka Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: compat.c,v 1.5 2009/10/14 18:18:53 pooka Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/kmem.h>
|
||||
|
@ -80,7 +80,7 @@ struct vattr50 {
|
|||
};
|
||||
|
||||
int
|
||||
rumppriv_sys___stat30(const char *path, struct stat *sb)
|
||||
rump_sys___stat30(const char *path, struct stat *sb)
|
||||
{
|
||||
struct compat_50_sys___stat30_args args;
|
||||
register_t retval = 0;
|
||||
|
@ -98,7 +98,7 @@ rumppriv_sys___stat30(const char *path, struct stat *sb)
|
|||
}
|
||||
|
||||
int
|
||||
rumppriv_sys___lstat30(const char *path, struct stat *sb)
|
||||
rump_sys___lstat30(const char *path, struct stat *sb)
|
||||
{
|
||||
struct compat_50_sys___lstat30_args args;
|
||||
register_t retval = 0;
|
||||
|
@ -120,7 +120,7 @@ rumppriv_sys___lstat30(const char *path, struct stat *sb)
|
|||
* the userspace namespace too
|
||||
*/
|
||||
void
|
||||
rumppriv_vattr50_to_vattr(const struct vattr *_va50, struct vattr *va)
|
||||
rump_vattr50_to_vattr(const struct vattr *_va50, struct vattr *va)
|
||||
{
|
||||
const struct vattr50 *va50 = (const struct vattr50 *)_va50;
|
||||
|
||||
|
@ -146,7 +146,7 @@ rumppriv_vattr50_to_vattr(const struct vattr *_va50, struct vattr *va)
|
|||
}
|
||||
|
||||
void
|
||||
rumppriv_vattr_to_vattr50(const struct vattr *va, struct vattr *_va50)
|
||||
rump_vattr_to_vattr50(const struct vattr *va, struct vattr *_va50)
|
||||
{
|
||||
struct vattr50 *va50 = (struct vattr50 *)_va50;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: rump_vfs.c,v 1.31 2009/10/14 17:29:20 pooka Exp $ */
|
||||
/* $NetBSD: rump_vfs.c,v 1.32 2009/10/14 18:18:53 pooka Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2008 Antti Kantee. All Rights Reserved.
|
||||
|
@ -29,7 +29,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: rump_vfs.c,v 1.31 2009/10/14 17:29:20 pooka Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: rump_vfs.c,v 1.32 2009/10/14 18:18:53 pooka Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/buf.h>
|
||||
|
@ -128,7 +128,7 @@ rump_vfs_fini(void)
|
|||
}
|
||||
|
||||
struct componentname *
|
||||
rumppriv_makecn(u_long nameiop, u_long flags, const char *name, size_t namelen,
|
||||
rump_makecn(u_long nameiop, u_long flags, const char *name, size_t namelen,
|
||||
kauth_cred_t creds, struct lwp *l)
|
||||
{
|
||||
struct componentname *cnp;
|
||||
|
@ -151,11 +151,11 @@ rumppriv_makecn(u_long nameiop, u_long flags, const char *name, size_t namelen,
|
|||
}
|
||||
|
||||
void
|
||||
rumppriv_freecn(struct componentname *cnp, int flags)
|
||||
rump_freecn(struct componentname *cnp, int flags)
|
||||
{
|
||||
|
||||
if (flags & RUMPCN_FREECRED)
|
||||
rumppriv_cred_put(cnp->cn_cred);
|
||||
rump_cred_put(cnp->cn_cred);
|
||||
|
||||
if ((cnp->cn_flags & SAVENAME) == 0 || flags & RUMPCN_FORCEFREE)
|
||||
PNBUF_PUT(cnp->cn_pnbuf);
|
||||
|
@ -163,7 +163,7 @@ rumppriv_freecn(struct componentname *cnp, int flags)
|
|||
}
|
||||
|
||||
int
|
||||
rumppriv_checksavecn(struct componentname *cnp)
|
||||
rump_checksavecn(struct componentname *cnp)
|
||||
{
|
||||
|
||||
if ((cnp->cn_flags & (SAVENAME | SAVESTART)) == 0) {
|
||||
|
@ -176,7 +176,7 @@ rumppriv_checksavecn(struct componentname *cnp)
|
|||
|
||||
/* hey baby, what's your namei? */
|
||||
int
|
||||
rumppriv_namei(uint32_t op, uint32_t flags, const char *namep,
|
||||
rump_namei(uint32_t op, uint32_t flags, const char *namep,
|
||||
struct vnode **dvpp, struct vnode **vpp, struct componentname **cnpp)
|
||||
{
|
||||
struct nameidata nd;
|
||||
|
@ -219,7 +219,7 @@ rumppriv_namei(uint32_t op, uint32_t flags, const char *namep,
|
|||
}
|
||||
|
||||
void
|
||||
rumppriv_getvninfo(struct vnode *vp, enum vtype *vtype,
|
||||
rump_getvninfo(struct vnode *vp, enum vtype *vtype,
|
||||
voff_t *vsize, dev_t *vdev)
|
||||
{
|
||||
|
||||
|
@ -232,7 +232,7 @@ rumppriv_getvninfo(struct vnode *vp, enum vtype *vtype,
|
|||
}
|
||||
|
||||
struct vfsops *
|
||||
rumppriv_vfslist_iterate(struct vfsops *ops)
|
||||
rump_vfslist_iterate(struct vfsops *ops)
|
||||
{
|
||||
|
||||
if (ops == NULL)
|
||||
|
@ -242,14 +242,14 @@ rumppriv_vfslist_iterate(struct vfsops *ops)
|
|||
}
|
||||
|
||||
struct vfsops *
|
||||
rumppriv_vfs_getopsbyname(const char *name)
|
||||
rump_vfs_getopsbyname(const char *name)
|
||||
{
|
||||
|
||||
return vfs_getopsbyname(name);
|
||||
}
|
||||
|
||||
int
|
||||
rumppriv_vfs_getmp(const char *path, struct mount **mpp)
|
||||
rump_vfs_getmp(const char *path, struct mount **mpp)
|
||||
{
|
||||
struct vnode *vp;
|
||||
int rv;
|
||||
|
@ -263,7 +263,7 @@ rumppriv_vfs_getmp(const char *path, struct mount **mpp)
|
|||
}
|
||||
|
||||
struct vattr*
|
||||
rumppriv_vattr_init(void)
|
||||
rump_vattr_init(void)
|
||||
{
|
||||
struct vattr *vap;
|
||||
|
||||
|
@ -274,63 +274,63 @@ rumppriv_vattr_init(void)
|
|||
}
|
||||
|
||||
void
|
||||
rumppriv_vattr_settype(struct vattr *vap, enum vtype vt)
|
||||
rump_vattr_settype(struct vattr *vap, enum vtype vt)
|
||||
{
|
||||
|
||||
vap->va_type = vt;
|
||||
}
|
||||
|
||||
void
|
||||
rumppriv_vattr_setmode(struct vattr *vap, mode_t mode)
|
||||
rump_vattr_setmode(struct vattr *vap, mode_t mode)
|
||||
{
|
||||
|
||||
vap->va_mode = mode;
|
||||
}
|
||||
|
||||
void
|
||||
rumppriv_vattr_setrdev(struct vattr *vap, dev_t dev)
|
||||
rump_vattr_setrdev(struct vattr *vap, dev_t dev)
|
||||
{
|
||||
|
||||
vap->va_rdev = dev;
|
||||
}
|
||||
|
||||
void
|
||||
rumppriv_vattr_free(struct vattr *vap)
|
||||
rump_vattr_free(struct vattr *vap)
|
||||
{
|
||||
|
||||
kmem_free(vap, sizeof(*vap));
|
||||
}
|
||||
|
||||
void
|
||||
rumppriv_vp_incref(struct vnode *vp)
|
||||
rump_vp_incref(struct vnode *vp)
|
||||
{
|
||||
|
||||
vref(vp);
|
||||
}
|
||||
|
||||
int
|
||||
rumppriv_vp_getref(struct vnode *vp)
|
||||
rump_vp_getref(struct vnode *vp)
|
||||
{
|
||||
|
||||
return vp->v_usecount;
|
||||
}
|
||||
|
||||
void
|
||||
rumppriv_vp_rele(struct vnode *vp)
|
||||
rump_vp_rele(struct vnode *vp)
|
||||
{
|
||||
|
||||
vrele(vp);
|
||||
}
|
||||
|
||||
void
|
||||
rumppriv_vp_interlock(struct vnode *vp)
|
||||
rump_vp_interlock(struct vnode *vp)
|
||||
{
|
||||
|
||||
mutex_enter(&vp->v_interlock);
|
||||
}
|
||||
|
||||
int
|
||||
rumppriv_vfs_unmount(struct mount *mp, int mntflags)
|
||||
rump_vfs_unmount(struct mount *mp, int mntflags)
|
||||
{
|
||||
#if 0
|
||||
struct evcnt *ev;
|
||||
|
@ -344,7 +344,7 @@ rumppriv_vfs_unmount(struct mount *mp, int mntflags)
|
|||
}
|
||||
|
||||
int
|
||||
rumppriv_vfs_root(struct mount *mp, struct vnode **vpp, int lock)
|
||||
rump_vfs_root(struct mount *mp, struct vnode **vpp, int lock)
|
||||
{
|
||||
int rv;
|
||||
|
||||
|
@ -359,28 +359,28 @@ rumppriv_vfs_root(struct mount *mp, struct vnode **vpp, int lock)
|
|||
}
|
||||
|
||||
int
|
||||
rumppriv_vfs_statvfs(struct mount *mp, struct statvfs *sbp)
|
||||
rump_vfs_statvfs(struct mount *mp, struct statvfs *sbp)
|
||||
{
|
||||
|
||||
return VFS_STATVFS(mp, sbp);
|
||||
}
|
||||
|
||||
int
|
||||
rumppriv_vfs_sync(struct mount *mp, int wait, kauth_cred_t cred)
|
||||
rump_vfs_sync(struct mount *mp, int wait, kauth_cred_t cred)
|
||||
{
|
||||
|
||||
return VFS_SYNC(mp, wait ? MNT_WAIT : MNT_NOWAIT, cred);
|
||||
}
|
||||
|
||||
int
|
||||
rumppriv_vfs_fhtovp(struct mount *mp, struct fid *fid, struct vnode **vpp)
|
||||
rump_vfs_fhtovp(struct mount *mp, struct fid *fid, struct vnode **vpp)
|
||||
{
|
||||
|
||||
return VFS_FHTOVP(mp, fid, vpp);
|
||||
}
|
||||
|
||||
int
|
||||
rumppriv_vfs_vptofh(struct vnode *vp, struct fid *fid, size_t *fidsize)
|
||||
rump_vfs_vptofh(struct vnode *vp, struct fid *fid, size_t *fidsize)
|
||||
{
|
||||
|
||||
return VFS_VPTOFH(vp, fid, fidsize);
|
||||
|
@ -388,7 +388,7 @@ rumppriv_vfs_vptofh(struct vnode *vp, struct fid *fid, size_t *fidsize)
|
|||
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
rumppriv_vfs_syncwait(struct mount *mp)
|
||||
rump_vfs_syncwait(struct mount *mp)
|
||||
{
|
||||
int n;
|
||||
|
||||
|
@ -430,14 +430,14 @@ rump_rcvp_lwpset(struct vnode *rvp, struct vnode *cvp, struct lwp *l)
|
|||
}
|
||||
|
||||
void
|
||||
rumppriv_rcvp_set(struct vnode *rvp, struct vnode *cvp)
|
||||
rump_rcvp_set(struct vnode *rvp, struct vnode *cvp)
|
||||
{
|
||||
|
||||
rump_rcvp_lwpset(rvp, cvp, curlwp);
|
||||
}
|
||||
|
||||
struct vnode *
|
||||
rumppriv_cdir_get(void)
|
||||
rump_cdir_get(void)
|
||||
{
|
||||
struct vnode *vp;
|
||||
struct cwdinfo *cwdi = curlwp->l_proc->p_cwdi;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: rumpfs.c,v 1.28 2009/10/14 17:29:20 pooka Exp $ */
|
||||
/* $NetBSD: rumpfs.c,v 1.29 2009/10/14 18:18:53 pooka Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Antti Kantee. All Rights Reserved.
|
||||
|
@ -28,7 +28,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: rumpfs.c,v 1.28 2009/10/14 17:29:20 pooka Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: rumpfs.c,v 1.29 2009/10/14 18:18:53 pooka Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/atomic.h>
|
||||
|
@ -259,7 +259,7 @@ doregister(const char *key, const char *hostpath,
|
|||
}
|
||||
|
||||
int
|
||||
rumppriv_etfs_register(const char *key, const char *hostpath,
|
||||
rump_etfs_register(const char *key, const char *hostpath,
|
||||
enum rump_etfs_type ftype)
|
||||
{
|
||||
|
||||
|
@ -267,7 +267,7 @@ rumppriv_etfs_register(const char *key, const char *hostpath,
|
|||
}
|
||||
|
||||
int
|
||||
rumppriv_etfs_register_withsize(const char *key, const char *hostpath,
|
||||
rump_etfs_register_withsize(const char *key, const char *hostpath,
|
||||
enum rump_etfs_type ftype, uint64_t begin, uint64_t size)
|
||||
{
|
||||
|
||||
|
@ -286,7 +286,7 @@ rumppriv_etfs_register_withsize(const char *key, const char *hostpath,
|
|||
}
|
||||
|
||||
int
|
||||
rumppriv_etfs_remove(const char *key)
|
||||
rump_etfs_remove(const char *key)
|
||||
{
|
||||
struct etfs *et;
|
||||
size_t keylen = strlen(key);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: if_virt.c,v 1.13 2009/10/14 17:29:20 pooka Exp $ */
|
||||
/* $NetBSD: if_virt.c,v 1.14 2009/10/14 18:18:53 pooka Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2008 Antti Kantee. All Rights Reserved.
|
||||
|
@ -26,7 +26,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_virt.c,v 1.13 2009/10/14 17:29:20 pooka Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_virt.c,v 1.14 2009/10/14 18:18:53 pooka Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/condvar.h>
|
||||
|
@ -98,7 +98,7 @@ configaddr(struct ifnet *ifp, struct ifaliasreq *ia)
|
|||
#endif
|
||||
|
||||
int
|
||||
rumppriv_virtif_create(int num)
|
||||
rump_virtif_create(int num)
|
||||
{
|
||||
struct virtif_sc *sc;
|
||||
struct ifnet *ifp;
|
||||
|
|
Loading…
Reference in New Issue