support real sysctls
This commit is contained in:
parent
f675bba464
commit
0b5af21c5a
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile.rumpkern,v 1.3 2008/07/31 05:38:05 simonb Exp $
|
||||
# $NetBSD: Makefile.rumpkern,v 1.4 2008/08/01 19:34:51 pooka Exp $
|
||||
#
|
||||
|
||||
.include "${RUMPTOP}/Makefile.rump"
|
||||
|
@ -22,12 +22,12 @@ SRCS= rump.c atomic.c auth.c emul.c intr.c genfs_io.c locks.c \
|
|||
SRCS+= fstrans_stub.c misc_stub.c pmap_stub.c vfsops_stub.c
|
||||
|
||||
# sys/kern
|
||||
SRCS+= clock_subr.c kern_descrip.c kern_stub.c param.c \
|
||||
subr_bufq.c subr_hash.c subr_prf2.c subr_specificdata.c \
|
||||
SRCS+= clock_subr.c kern_descrip.c kern_module.c kern_stub.c kern_sysctl.c \
|
||||
param.c subr_bufq.c subr_hash.c subr_prf2.c subr_specificdata.c \
|
||||
subr_time.c subr_workqueue.c sys_descrip.c sys_generic.c vfs_bio.c \
|
||||
vfs_cache.c vfs_getcwd.c vfs_hooks.c vfs_init.c vfs_lookup.c \
|
||||
vfs_subr.c vfs_vnops.c vfs_syscalls.c vfs_wapbl.c vnode_if.c \
|
||||
subr_kobj.c kern_module.c
|
||||
subr_kobj.c
|
||||
|
||||
# sys/miscfs
|
||||
SRCS+= genfs_vfsops.c genfs_vnops.c sync_subr.c
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: emul.c,v 1.44 2008/07/29 13:17:47 pooka Exp $ */
|
||||
/* $NetBSD: emul.c,v 1.45 2008/08/01 19:34:51 pooka Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Antti Kantee. All Rights Reserved.
|
||||
|
@ -186,6 +186,14 @@ copyinstr(const void *uaddr, void *kaddr, size_t len, size_t *done)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
kcopy(const void *src, void *dst, size_t len)
|
||||
{
|
||||
|
||||
memcpy(dst, src, len);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
uiomove(void *buf, size_t n, struct uio *uio)
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: misc_stub.c,v 1.10 2008/06/28 09:36:29 chris Exp $ */
|
||||
/* $NetBSD: misc_stub.c,v 1.11 2008/08/01 19:34:51 pooka Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Antti Kantee. All Rights Reserved.
|
||||
|
@ -57,62 +57,6 @@ knote(struct klist *list, long hint)
|
|||
return;
|
||||
}
|
||||
|
||||
/* not tonight, honey */
|
||||
int
|
||||
sysctl_createv(struct sysctllog **log, int cflags,
|
||||
const struct sysctlnode **rnode, const struct sysctlnode **cnode,
|
||||
int flags, int type, const char *namep, const char *desc,
|
||||
sysctlfn func, u_quad_t qv, void *newp, size_t newlen, ...)
|
||||
{
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
sysctl_teardown(struct sysctllog **log)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
int
|
||||
sysctl_notavail(SYSCTLFN_ARGS)
|
||||
{
|
||||
|
||||
return EOPNOTSUPP;
|
||||
}
|
||||
|
||||
int
|
||||
sysctl_lookup(SYSCTLFN_ARGS)
|
||||
{
|
||||
|
||||
return ENOSYS;
|
||||
}
|
||||
|
||||
int
|
||||
sysctl_query(SYSCTLFN_ARGS)
|
||||
{
|
||||
|
||||
return ENOSYS;
|
||||
}
|
||||
|
||||
void
|
||||
sysctl_lock(bool write)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
sysctl_relock(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
sysctl_unlock(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
struct cpu_info *
|
||||
cpu_lookup_byindex(u_int index)
|
||||
{
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
/* $NetBSD: ksyms.h,v 1.1 2008/08/01 19:34:51 pooka Exp $ */
|
||||
|
||||
/* public domain */
|
|
@ -0,0 +1,3 @@
|
|||
/* $NetBSD: opt_defcorename.h,v 1.1 2008/08/01 19:34:51 pooka Exp $ */
|
||||
|
||||
#define DEFCORENAME "rumpdump"
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: rump.c,v 1.50 2008/08/01 14:47:28 pooka Exp $ */
|
||||
/* $NetBSD: rump.c,v 1.51 2008/08/01 19:34:51 pooka Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Antti Kantee. All Rights Reserved.
|
||||
|
@ -41,6 +41,7 @@
|
|||
#include <sys/vnode.h>
|
||||
#include <sys/vfs_syscalls.h>
|
||||
#include <sys/wapbl.h>
|
||||
#include <sys/sysctl.h>
|
||||
|
||||
#include <miscfs/specfs/specdev.h>
|
||||
|
||||
|
@ -80,7 +81,8 @@ rump_aiodone_worker(struct work *wk, void *dummy)
|
|||
}
|
||||
#endif /* RUMP_WITHOUT_THREADS */
|
||||
|
||||
int rump_inited;
|
||||
static int rump_inited;
|
||||
static struct emul emul_rump;
|
||||
|
||||
void
|
||||
rump_init()
|
||||
|
@ -114,6 +116,7 @@ rump_init()
|
|||
p->p_pid = 0;
|
||||
p->p_fd = &rump_filedesc0;
|
||||
p->p_vmspace = &rump_vmspace;
|
||||
p->p_emul = &emul_rump;
|
||||
l->l_cred = rump_cred;
|
||||
l->l_proc = p;
|
||||
l->l_lid = 1;
|
||||
|
@ -134,6 +137,7 @@ rump_init()
|
|||
|
||||
fd_sys_init();
|
||||
module_init();
|
||||
sysctl_init();
|
||||
vfsinit();
|
||||
bufinit();
|
||||
wapbl_init();
|
||||
|
|
Loading…
Reference in New Issue