include subr_devsw in rumpkern

This commit is contained in:
pooka 2008-12-29 17:45:55 +00:00
parent 8583cae233
commit 614c33507f
3 changed files with 23 additions and 42 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.rumpkern,v 1.22 2008/12/18 11:16:36 pooka Exp $
# $NetBSD: Makefile.rumpkern,v 1.23 2008/12/29 17:45:55 pooka Exp $
#
.include "${RUMPTOP}/Makefile.rump"
@ -33,7 +33,7 @@ SRCS+= kern_auth.c kern_descrip.c kern_malloc_stdtype.c kern_module.c \
kern_uidinfo.c param.c sys_descrip.c sys_generic.c
# sys/kern subr (misc)
SRCS+= subr_callback.c subr_hash.c subr_iostat.c \
SRCS+= subr_devsw.c subr_callback.c subr_hash.c subr_iostat.c \
subr_kobj.c subr_once.c subr_prf2.c subr_specificdata.c \
subr_time.c subr_workqueue.c

View File

@ -1,4 +1,4 @@
/* $NetBSD: emul.c,v 1.63 2008/12/21 17:49:55 cegger Exp $ */
/* $NetBSD: emul.c,v 1.64 2008/12/29 17:45:55 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.63 2008/12/21 17:49:55 cegger Exp $");
__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.64 2008/12/29 17:45:55 pooka Exp $");
#define malloc(a,b,c) __wrap_malloc(a,b,c)
@ -96,6 +96,21 @@ int domainnamelen;
const struct filterops seltrue_filtops;
#define DEVSW_SIZE 255
const struct bdevsw *bdevsw0[DEVSW_SIZE]; /* XXX storage size */
const struct bdevsw **bdevsw = bdevsw0;
const int sys_cdevsws = DEVSW_SIZE;
int max_cdevsws = DEVSW_SIZE;
const struct cdevsw *cdevsw0[DEVSW_SIZE]; /* XXX storage size */
const struct cdevsw **cdevsw = cdevsw0;
const int sys_bdevsws = DEVSW_SIZE;
int max_bdevsws = DEVSW_SIZE;
struct devsw_conv devsw_conv0;
struct devsw_conv *devsw_conv = &devsw_conv0;
int max_devsw_convs = 0;
void
panic(const char *fmt, ...)
{
@ -279,13 +294,6 @@ uio_setup_sysspace(struct uio *uio)
uio->uio_vmspace = UIO_VMSPACE_SYS;
}
const struct bdevsw *
bdevsw_lookup(dev_t dev)
{
return (const struct bdevsw *)1;
}
devclass_t
device_class(device_t dev)
{
@ -364,20 +372,6 @@ getmicrotime(struct timeval *tv)
rumpuser_gettimeofday(tv, &error);
}
void
bdev_strategy(struct buf *bp)
{
panic("%s: not supported", __func__);
}
int
bdev_type(dev_t dev)
{
return D_DISK;
}
struct kthdesc {
void (*f)(void *);
void *arg;
@ -636,21 +630,6 @@ assert_sleepable(void)
/* always sleepable, although we should improve this */
}
int
devsw_attach(const char *devname, const struct bdevsw *bdev, int *bmajor,
const struct cdevsw *cdev, int *cmajor)
{
panic("%s: not implemented", __func__);
}
int
devsw_detach(const struct bdevsw *bdev, const struct cdevsw *cdev)
{
panic("%s: not implemented", __func__);
}
void
tc_setclock(struct timespec *ts)
{

View File

@ -1,4 +1,4 @@
/* $NetBSD: rump.c,v 1.78 2008/12/18 00:24:12 pooka Exp $ */
/* $NetBSD: rump.c,v 1.79 2008/12/29 17:45:55 pooka Exp $ */
/*
* Copyright (c) 2007 Antti Kantee. All Rights Reserved.
@ -28,12 +28,13 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.78 2008/12/18 00:24:12 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.79 2008/12/29 17:45:55 pooka Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
#include <sys/buf.h>
#include <sys/callout.h>
#include <sys/conf.h>
#include <sys/cpu.h>
#include <sys/filedesc.h>
#include <sys/iostat.h>
@ -177,6 +178,7 @@ _rump_init(int rump_version)
module_init();
sysctl_init();
softint_init(&rump_cpu);
devsw_init();
/* these do nothing if not present */
rump_vfs_init();