Add the lkm stuff I've been working on to the tree.

This mostly works -- see the README file in sys/lkm for more information
on what does and doesn't.  I'm putting this in here mainly to help speed
development and such to make this useful sooner.
This commit is contained in:
explorer 1996-08-22 20:18:07 +00:00
parent 562faf95ac
commit f190d66387
40 changed files with 1563 additions and 0 deletions

5
sys/lkm/Makefile Normal file
View File

@ -0,0 +1,5 @@
# $NetBSD: Makefile,v 1.1 1996/08/22 20:18:07 explorer Exp $
SUBDIR= compat vfs
.include <bsd.subdir.mk>

71
sys/lkm/README Normal file
View File

@ -0,0 +1,71 @@
$NetBSD: README,v 1.1 1996/08/22 20:18:10 explorer Exp $
Based on some examples in /usr/share/lkm, I have started adding
loadable modules for some portions of NetBSD I don't think should
require a kernel rebuild to install.
So far, I have added the following:
cd9660
fdesc
kernfs (slightly different than in /usr/share/lkm)
msdosfs
mfs
nullfs
portal
procfs
umapfs
union
Building and Testing
--------------------
mkdir /usr/lkm (if it's not there)
make depend && make && make install
Then, to install cd9660, for example, type:
modload -v -e cd9660_lkmentry -o /var/run/lkm.cd9660 /usr/lkm/cd9660.o
(or "make load" in the correct directory)
To remove it from memory, type:
modunload -n cd9660
(or "make unload" in the correct directory)
Notes
-----
Currently there is no symbol table management so the in-kernel debugger will
loose.
The LKM interface will (hopefully) be changing into something more usable.
If you use these files as a reference, you might have to change your
code if you want to use the new interface. I expect the old one to be
supported if it is possible to do so.
COMPAT modules
--------------
The FreeBSD module DOES load, but it will not work without other kernel
modifications.
The Linux module compiles, and also requires other kernel modifications
to run. It has not been tested.
VFS modules
-----------
These are somewhat tested. Since this whole system is still under
development use these at your own risk.
Type Id Off Loadaddr Size Info Rev Module Name
VFS 0 21 f873d000 0020 f8744000 1 msdosfs
VFS 1 20 f8746000 000c f8748000 1 procfs
VFS 2 19 f8839000 0008 f883a000 1 kernfs
VFS 3 18 f883b000 0008 f883c000 1 nullfs
VFS 4 17 f8840000 000c f8842000 1 fdesc
VFS 5 16 f8843000 0008 f8844000 1 portal
VFS 6 15 f8845000 000c f8847000 1 umapfs
VFS 7 14 f8848000 0014 f884c000 1 union
VFS 8 13 f884d000 0008 f884e000 1 mfs
--Michael <explorer@flame.org>

24
sys/lkm/TODO Normal file
View File

@ -0,0 +1,24 @@
$NetBSD: TODO,v 1.1 1996/08/22 20:18:11 explorer Exp $
Always a lot to do. :)
o Learn how loadable devices can configure themselves, like the interrupt,
dma, probing, attaching, etc. Then start adding some of those to the
lkm tree.
o Figgure out if binary emulation (freebsd, linux, ultrix, etc) can be
made loadable or not. [They can be. I have some kernel mods which
will make freebsd and linux loadable at least]
o decide if fifofs is useful in any way as is, or if it should install
syscalls as well. [it will have to install syscalls]
o decide if lfs is useful in any way as is, or if it should install
syscalls as well. Of course, it's broken in other ways, but...
[it will have to install syscalls]
o decide if it is even useful to make ffs into a loadable module.
[for diskless boots, sure, why not]
o what about nfs? Server and client should both be loadable I suppose.
[good luck...]

5
sys/lkm/compat/Makefile Normal file
View File

@ -0,0 +1,5 @@
# $NetBSD: Makefile,v 1.1 1996/08/22 20:18:13 explorer Exp $
SUBDIR= freebsd linux
.include <bsd.subdir.mk>

View File

@ -0,0 +1,18 @@
# $NetBSD: Makefile,v 1.1 1996/08/22 20:18:15 explorer Exp $
.PATH: /sys/compat/freebsd /sys/arch/i386/i386
CFLAGS+= -DVM86
NOMAN= yep
KMOD= compat_freebsd
SRCS= freebsd_exec.c freebsd_misc.c freebsd_sysent.c freebsd_file.c
SRCS+= freebsd_ptrace.c freebsd_ioctl.c freebsd_syscalls.c
SRCS+= freebsd_machdep.c
SRCS+= lkminit_emul.c
.include <bsd.kmod.mk>

View File

@ -0,0 +1,66 @@
/* $NetBSD: lkminit_emul.c,v 1.1 1996/08/22 20:18:16 explorer Exp $ */
/*
* Copyright (C) Michael Graff, 1996.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed for NetBSD by Michael Graff.
* 4. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/param.h>
#include <sys/ioctl.h>
#include <sys/systm.h>
#include <sys/conf.h>
#include <sys/mount.h>
#include <sys/exec.h>
#include <sys/lkm.h>
#include <sys/file.h>
#include <sys/errno.h>
#include <compat/freebsd/freebsd_exec.h>
extern int exec_freebsd_aout_makecmds();
struct execsw freebsd_lkm_execsw = {
FREEBSD_AOUT_HDR_SIZE, exec_freebsd_aout_makecmds,
};
/*
* declare the filesystem
*/
MOD_EXEC("freebsd", -1, &freebsd_lkm_execsw);
/*
* entry point
*/
int
compat_freebsd_lkmentry(lkmtp, cmd, ver)
struct lkm_table *lkmtp;
int cmd;
int ver;
{
DISPATCH(lkmtp, cmd, ver, lkm_nofunc, lkm_nofunc, lkm_nofunc);
}

View File

@ -0,0 +1,19 @@
# $NetBSD: Makefile,v 1.1 1996/08/22 20:18:18 explorer Exp $
.PATH: /sys/compat/linux /sys/arch/i386/i386
CFLAGS+= -DVM86 -DNVT=1
NOMAN= yep
KMOD= compat_linux
SRCS= linux_audio.c linux_misc.c linux_error.c linux_signal.c
SRCS+= linux_exec.c linux_socket.c linux_file.c linux_syscalls.c
SRCS+= linux_ioctl.c linux_sysent.c linux_ipc.c linux_termios.c
SRCS+= linux_machdep.c
SRCS+= lkminit_linux.c
.include <bsd.kmod.mk>

View File

@ -0,0 +1,107 @@
/* $NetBSD: lkminit_linux.c,v 1.1 1996/08/22 20:18:19 explorer Exp $ */
/*
* Copyright (C) Michael Graff, 1996.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed for NetBSD by Michael Graff.
* 4. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/param.h>
#include <sys/ioctl.h>
#include <sys/systm.h>
#include <sys/conf.h>
#include <sys/mount.h>
#include <sys/exec.h>
#include <sys/exec_elf.h>
#include <sys/lkm.h>
#include <sys/file.h>
#include <sys/errno.h>
#include <machine/cpu.h>
#include <machine/reg.h>
#include <machine/exec.h>
#include <compat/linux/linux_exec.h>
extern int exec_linux_aout_makecmds();
extern struct emul *emul_linux_elf;
extern struct emul *emul_linux_aout;
extern struct emul _emul_linux_elf;
extern struct emul _emul_linux_aout;
struct execsw linux_lkm_execsw = {
LINUX_AOUT_HDR_SIZE, exec_linux_aout_makecmds,
};
/*
* declare the filesystem
*/
MOD_EXEC("compat_linux", -1, &linux_lkm_execsw);
/*
* entry point
*/
int
compat_linux_lkmentry(lkmtp, cmd, ver)
struct lkm_table *lkmtp;
int cmd;
int ver;
{
DISPATCH(lkmtp, cmd, ver,
compat_linux_lkmload,
compat_linux_lkmunload,
lkm_nofunc);
}
int
compat_linux_lkmload(lkmtp, cmd)
struct lkm_table *lkmtp;
int cmd;
{
if (elf_probe_funcs_insert(linux_elf_probe))
return 1; /* Failure! */
emul_linux_aout = &_emul_linux_aout;
emul_linux_elf = &_emul_linux_elf;
return 0;
}
/*
* Note that it is NOT safe to unload this at all...
*/
int
compat_linux_lkmunload(lkmtp, cmd)
struct lkm_table *lkmtp;
int cmd;
{
if (elf_probe_funcs_insert(linux_elf_probe))
return 1; /* Failure! */
emul_linux_aout = NULL;
emul_linux_elf = NULL;
return 0;
}

5
sys/lkm/vfs/Makefile Normal file
View File

@ -0,0 +1,5 @@
# $NetBSD: Makefile,v 1.1 1996/08/22 20:18:21 explorer Exp $
SUBDIR= isofs miscfs msdosfs ufs
.include <bsd.subdir.mk>

View File

@ -0,0 +1,5 @@
# $NetBSD: Makefile,v 1.1 1996/08/22 20:18:23 explorer Exp $
SUBDIR= cd9660
.include <bsd.subdir.mk>

View File

@ -0,0 +1,14 @@
# $NetBSD: Makefile,v 1.1 1996/08/22 20:18:25 explorer Exp $
.PATH: /sys/isofs/cd9660 ${.CURDIR}/../..
NOMAN= yep
KMOD= cd9660
VFS_LKM= yes
SRCS= lkminit_vfs.c
SRCS+= cd9660_bmap.c cd9660_lookup.c cd9660_rrip.c cd9660_vfsops.c
SRCS+= cd9660_node.c cd9660_vnops.c cd9660_util.c
.include <bsd.kmod.mk>

View File

@ -0,0 +1,72 @@
/* $NetBSD: lkminit_vfs.c,v 1.1 1996/08/22 20:18:26 explorer Exp $ */
/*
* Copyright (C) Michael Graff, 1996.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed for NetBSD by Michael Graff.
* 4. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/param.h>
#include <sys/ioctl.h>
#include <sys/systm.h>
#include <sys/conf.h>
#include <sys/mount.h>
#include <sys/exec.h>
#include <sys/lkm.h>
#include <sys/file.h>
#include <sys/errno.h>
/*
* This is the vfsops table for the file system in question
*/
extern struct vfsops cd9660_vfsops;
extern struct vnodeopv_desc cd9660_vnodeop_opv_desc;
/*
* declare the filesystem
*/
MOD_VFS("cd9660", -1, &cd9660_vfsops);
/*
* entry point
*/
int
cd9660_lkmentry(lkmtp, cmd, ver)
struct lkm_table *lkmtp;
int cmd;
int ver;
{
/*
* This is normally done automatically at boot time if the
* opv_desc is listed in vfs_opv_descs[] in vfs_conf.c. For
* loaded modules, we have to do it manually.
*/
vfs_opv_init_explicit(&cd9660_vnodeop_opv_desc);
vfs_opv_init_default(&cd9660_vnodeop_opv_desc);
DISPATCH(lkmtp, cmd, ver, lkm_nofunc, lkm_nofunc, lkm_nofunc)
}

View File

@ -0,0 +1,7 @@
# $NetBSD: Makefile,v 1.1 1996/08/22 20:18:27 explorer Exp $
# MISSING: fifo (prolly needs a syscall layer as well)
# deadfs
SUBDIR= fdesc kernfs nullfs portal procfs umapfs union
.include <bsd.subdir.mk>

View File

@ -0,0 +1,18 @@
# $NetBSD: Makefile,v 1.1 1996/08/22 20:18:29 explorer Exp $
.PATH: /sys/miscfs/deadfs
NOMAN= yep
GENERATE= vnode_if.h
CLEANFILES+= vnode_if.[ch]
LKM= deadfs
SRCS= lkminit_deadfs.c
SRCS+= dead_vnops.c
vnode_if.h: /sys/kern/vnode_if.sh /sys/kern/vnode_if.src
sh /sys/kern/vnode_if.sh /sys/kern/vnode_if.src
.include <bsd.lkm.mk>

View File

@ -0,0 +1,72 @@
/* $NetBSD: lkminit_deadfs.c,v 1.1 1996/08/22 20:18:30 explorer Exp $ */
/*
* Copyright (C) Michael Graff, 1996.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed for NetBSD by Michael Graff.
* 4. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/param.h>
#include <sys/ioctl.h>
#include <sys/systm.h>
#include <sys/conf.h>
#include <sys/mount.h>
#include <sys/exec.h>
#include <sys/lkm.h>
#include <sys/file.h>
#include <sys/errno.h>
/*
* This is the vfsops table for the file system in question
*/
extern struct vfsops deadfs_vfsops;
extern struct vnodeopv_desc deadfs_vnodeop_opv_desc;
/*
* declare the filesystem
*/
MOD_VFS("deadfs", -1, &deadfs_vfsops);
/*
* entry point
*/
int
deadfs_lkmentry(lkmtp, cmd, ver)
struct lkm_table *lkmtp;
int cmd;
int ver;
{
/*
* This is normally done automatically at boot time if the
* opv_desc is listed in vfs_opv_descs[] in vfs_conf.c. For
* loaded modules, we have to do it manually.
*/
vfs_opv_init_explicit(&deadfs_vnodeop_opv_desc);
vfs_opv_init_default(&deadfs_vnodeop_opv_desc);
DISPATCH(lkmtp, cmd, ver, lkm_nofunc, lkm_nofunc, lkm_nofunc)
}

View File

@ -0,0 +1,13 @@
# $NetBSD: Makefile,v 1.1 1996/08/22 20:18:32 explorer Exp $
.PATH: /sys/miscfs/fdesc ${.CURDIR}/../..
NOMAN= yep
KMOD= fdesc
VFS_LKM= yes
SRCS= lkminit_vfs.c
SRCS+= fdesc_vfsops.c fdesc_vnops.c
.include <bsd.kmod.mk>

View File

@ -0,0 +1,72 @@
/* $NetBSD: lkminit_vfs.c,v 1.1 1996/08/22 20:18:33 explorer Exp $ */
/*
* Copyright (C) Michael Graff, 1996.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed for NetBSD by Michael Graff.
* 4. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/param.h>
#include <sys/ioctl.h>
#include <sys/systm.h>
#include <sys/conf.h>
#include <sys/mount.h>
#include <sys/exec.h>
#include <sys/lkm.h>
#include <sys/file.h>
#include <sys/errno.h>
/*
* This is the vfsops table for the file system in question
*/
extern struct vfsops fdesc_vfsops;
extern struct vnodeopv_desc fdesc_vnodeop_opv_desc;
/*
* declare the filesystem
*/
MOD_VFS("fdesc", -1, &fdesc_vfsops);
/*
* entry point
*/
int
fdesc_lkmentry(lkmtp, cmd, ver)
struct lkm_table *lkmtp;
int cmd;
int ver;
{
/*
* This is normally done automatically at boot time if the
* opv_desc is listed in vfs_opv_descs[] in vfs_conf.c. For
* loaded modules, we have to do it manually.
*/
vfs_opv_init_explicit(&fdesc_vnodeop_opv_desc);
vfs_opv_init_default(&fdesc_vnodeop_opv_desc);
DISPATCH(lkmtp, cmd, ver, lkm_nofunc, lkm_nofunc, lkm_nofunc)
}

View File

@ -0,0 +1,22 @@
# $NetBSD: Makefile,v 1.1 1996/08/22 20:18:35 explorer Exp $
.PATH: /sys/miscfs/fifofs
NOMAN= yep
GENERATE= vnode_if.h
CLEANFILES+= vnode_if.[ch]
#
# fifo needs this. Can this module even be loaded?
CFLAGS+= -DFIFO
LKM= fifofs
SRCS= lkminit_${LKM}.c
SRCS+= fifo_vnops.c
vnode_if.h: /sys/kern/vnode_if.sh /sys/kern/vnode_if.src
sh /sys/kern/vnode_if.sh /sys/kern/vnode_if.src
.include <bsd.lkm.mk>

View File

@ -0,0 +1,74 @@
/* $NetBSD: lkminit_fifofs.c,v 1.1 1996/08/22 20:18:36 explorer Exp $ */
/*
* Copyright (C) Michael Graff, 1996.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed for NetBSD by Michael Graff.
* 4. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/param.h>
#include <sys/ioctl.h>
#include <sys/systm.h>
#include <sys/conf.h>
#include <sys/mount.h>
#include <sys/exec.h>
#include <sys/lkm.h>
#include <sys/file.h>
#include <sys/errno.h>
/*
* This is the vfsops table for the file system in question
*
* NOTE: fifo, not fifofs as it probably should be
*/
extern struct vfsops fifo_vfsops;
extern struct vnodeopv_desc fifo_vnodeop_opv_desc;
/*
* declare the filesystem
*/
MOD_VFS("fifofs", -1, &fifo_vfsops);
/*
* entry point
*/
int
fifofs_lkmentry(lkmtp, cmd, ver)
struct lkm_table *lkmtp;
int cmd;
int ver;
{
/*
* This is normally done automatically at boot time if the
* opv_desc is listed in vfs_opv_descs[] in vfs_conf.c. For
* loaded modules, we have to do it manually.
*/
vfs_opv_init_explicit(&fifo_vnodeop_opv_desc);
vfs_opv_init_default(&fifo_vnodeop_opv_desc);
DISPATCH(lkmtp, cmd, ver, lkm_nofunc, lkm_nofunc, lkm_nofunc)
}

View File

@ -0,0 +1,13 @@
# $NetBSD: Makefile,v 1.1 1996/08/22 20:18:38 explorer Exp $
.PATH: /sys/miscfs/kernfs ${.CURDIR}/../..
NOMAN= yep
KMOD= kernfs
VFS_LKM= yes
SRCS= lkminit_vfs.c
SRCS+= kernfs_vfsops.c kernfs_vnops.c
.include <bsd.kmod.mk>

View File

@ -0,0 +1,72 @@
/* $NetBSD: lkminit_vfs.c,v 1.1 1996/08/22 20:18:42 explorer Exp $ */
/*
* Copyright (C) Michael Graff, 1996.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed for NetBSD by Michael Graff.
* 4. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/param.h>
#include <sys/ioctl.h>
#include <sys/systm.h>
#include <sys/conf.h>
#include <sys/mount.h>
#include <sys/exec.h>
#include <sys/lkm.h>
#include <sys/file.h>
#include <sys/errno.h>
/*
* This is the vfsops table for the file system in question
*/
extern struct vfsops kernfs_vfsops;
extern struct vnodeopv_desc kernfs_vnodeop_opv_desc;
/*
* declare the filesystem
*/
MOD_VFS("kernfs", -1, &kernfs_vfsops);
/*
* entry point
*/
int
kernfs_lkmentry(lkmtp, cmd, ver)
struct lkm_table *lkmtp;
int cmd;
int ver;
{
/*
* This is normally done automatically at boot time if the
* opv_desc is listed in vfs_opv_descs[] in vfs_conf.c. For
* loaded modules, we have to do it manually.
*/
vfs_opv_init_explicit(&kernfs_vnodeop_opv_desc);
vfs_opv_init_default(&kernfs_vnodeop_opv_desc);
DISPATCH(lkmtp, cmd, ver, lkm_nofunc, lkm_nofunc, lkm_nofunc)
}

View File

@ -0,0 +1,19 @@
# $NetBSD: Makefile,v 1.1 1996/08/22 20:18:44 explorer Exp $
.PATH: /sys/miscfs/nullfs ${.CURDIR}/../..
NOMAN= yep
KMOD= nullfs
VFS_LKM= yes
#
# Drat. These aren't standard...
#
MODVNOPS=null_vnodeop_opv_desc
MODVFSOPS=null_vfsops
SRCS= lkminit_vfs.c
SRCS+= null_vfsops.c null_vnops.c null_subr.c
.include <bsd.kmod.mk>

View File

@ -0,0 +1,72 @@
/* $NetBSD: lkminit_vfs.c,v 1.1 1996/08/22 20:18:45 explorer Exp $ */
/*
* Copyright (C) Michael Graff, 1996.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed for NetBSD by Michael Graff.
* 4. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/param.h>
#include <sys/ioctl.h>
#include <sys/systm.h>
#include <sys/conf.h>
#include <sys/mount.h>
#include <sys/exec.h>
#include <sys/lkm.h>
#include <sys/file.h>
#include <sys/errno.h>
/*
* This is the vfsops table for the file system in question
*/
extern struct vfsops null_vfsops;
extern struct vnodeopv_desc null_vnodeop_opv_desc;
/*
* declare the filesystem
*/
MOD_VFS("nullfs", -1, &null_vfsops);
/*
* entry point
*/
int
nullfs_lkmentry(lkmtp, cmd, ver)
struct lkm_table *lkmtp;
int cmd;
int ver;
{
/*
* This is normally done automatically at boot time if the
* opv_desc is listed in vfs_opv_descs[] in vfs_conf.c. For
* loaded modules, we have to do it manually.
*/
vfs_opv_init_explicit(&null_vnodeop_opv_desc);
vfs_opv_init_default(&null_vnodeop_opv_desc);
DISPATCH(lkmtp, cmd, ver, lkm_nofunc, lkm_nofunc, lkm_nofunc)
}

View File

@ -0,0 +1,13 @@
# $NetBSD: Makefile,v 1.1 1996/08/22 20:18:47 explorer Exp $
.PATH: /sys/miscfs/portal ${.CURDIR}/../..
NOMAN= yep
KMOD= portal
VFS_LKM= yes
SRCS= lkminit_vfs.c
SRCS+= portal_vfsops.c portal_vnops.c
.include <bsd.kmod.mk>

View File

@ -0,0 +1,72 @@
/* $NetBSD: lkminit_vfs.c,v 1.1 1996/08/22 20:18:48 explorer Exp $ */
/*
* Copyright (C) Michael Graff, 1996.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed for NetBSD by Michael Graff.
* 4. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/param.h>
#include <sys/ioctl.h>
#include <sys/systm.h>
#include <sys/conf.h>
#include <sys/mount.h>
#include <sys/exec.h>
#include <sys/lkm.h>
#include <sys/file.h>
#include <sys/errno.h>
/*
* This is the vfsops table for the file system in question
*/
extern struct vfsops portal_vfsops;
extern struct vnodeopv_desc portal_vnodeop_opv_desc;
/*
* declare the filesystem
*/
MOD_VFS("portal", -1, &portal_vfsops);
/*
* entry point
*/
int
portal_lkmentry(lkmtp, cmd, ver)
struct lkm_table *lkmtp;
int cmd;
int ver;
{
/*
* This is normally done automatically at boot time if the
* opv_desc is listed in vfs_opv_descs[] in vfs_conf.c. For
* loaded modules, we have to do it manually.
*/
vfs_opv_init_explicit(&portal_vnodeop_opv_desc);
vfs_opv_init_default(&portal_vnodeop_opv_desc);
DISPATCH(lkmtp, cmd, ver, lkm_nofunc, lkm_nofunc, lkm_nofunc)
}

View File

@ -0,0 +1,14 @@
# $NetBSD: Makefile,v 1.1 1996/08/22 20:18:51 explorer Exp $
.PATH: /sys/miscfs/procfs ${.CURDIR}/../..
NOMAN= yep
KMOD= procfs
VFS_LKM= yes
SRCS= lkminit_vfs.c
SRCS+= procfs_vfsops.c procfs_vnops.c procfs_ctl.c procfs_note.c
SRCS+= procfs_status.c procfs_subr.c
.include <bsd.kmod.mk>

View File

@ -0,0 +1,72 @@
/* $NetBSD: lkminit_vfs.c,v 1.1 1996/08/22 20:18:53 explorer Exp $ */
/*
* Copyright (C) Michael Graff, 1996.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed for NetBSD by Michael Graff.
* 4. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/param.h>
#include <sys/ioctl.h>
#include <sys/systm.h>
#include <sys/conf.h>
#include <sys/mount.h>
#include <sys/exec.h>
#include <sys/lkm.h>
#include <sys/file.h>
#include <sys/errno.h>
/*
* This is the vfsops table for the file system in question
*/
extern struct vfsops procfs_vfsops;
extern struct vnodeopv_desc procfs_vnodeop_opv_desc;
/*
* declare the filesystem
*/
MOD_VFS("procfs", -1, &procfs_vfsops);
/*
* entry point
*/
int
procfs_lkmentry(lkmtp, cmd, ver)
struct lkm_table *lkmtp;
int cmd;
int ver;
{
/*
* This is normally done automatically at boot time if the
* opv_desc is listed in vfs_opv_descs[] in vfs_conf.c. For
* loaded modules, we have to do it manually.
*/
vfs_opv_init_explicit(&procfs_vnodeop_opv_desc);
vfs_opv_init_default(&procfs_vnodeop_opv_desc);
DISPATCH(lkmtp, cmd, ver, lkm_nofunc, lkm_nofunc, lkm_nofunc)
}

View File

@ -0,0 +1,19 @@
# $NetBSD: Makefile,v 1.1 1996/08/22 20:18:56 explorer Exp $
.PATH: /sys/miscfs/umapfs ${.CURDIR}/../..
NOMAN= yep
KMOD= umapfs
VFS_LKM= yes
#
# These are not standard names, darnit!
MODVNOPS=umapfs_vnodeop_opv_desc
MODVFSOPS=umap_vfsops
SRCS= lkminit_vfs.c
SRCS+= umap_vfsops.c umap_vnops.c umap_subr.c
.include <bsd.kmod.mk>

View File

@ -0,0 +1,72 @@
/* $NetBSD: lkminit_vfs.c,v 1.1 1996/08/22 20:18:58 explorer Exp $ */
/*
* Copyright (C) Michael Graff, 1996.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed for NetBSD by Michael Graff.
* 4. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/param.h>
#include <sys/ioctl.h>
#include <sys/systm.h>
#include <sys/conf.h>
#include <sys/mount.h>
#include <sys/exec.h>
#include <sys/lkm.h>
#include <sys/file.h>
#include <sys/errno.h>
/*
* This is the vfsops table for the file system in question
*/
extern struct vfsops umap_vfsops;
extern struct vnodeopv_desc umap_vnodeop_opv_desc;
/*
* declare the filesystem
*/
MOD_VFS("umapfs", -1, &umap_vfsops);
/*
* entry point
*/
int
umapfs_lkmentry(lkmtp, cmd, ver)
struct lkm_table *lkmtp;
int cmd;
int ver;
{
/*
* This is normally done automatically at boot time if the
* opv_desc is listed in vfs_opv_descs[] in vfs_conf.c. For
* loaded modules, we have to do it manually.
*/
vfs_opv_init_explicit(&umap_vnodeop_opv_desc);
vfs_opv_init_default(&umap_vnodeop_opv_desc);
DISPATCH(lkmtp, cmd, ver, lkm_nofunc, lkm_nofunc, lkm_nofunc)
}

View File

@ -0,0 +1,13 @@
# $NetBSD: Makefile,v 1.1 1996/08/22 20:19:00 explorer Exp $
.PATH: /sys/miscfs/union ${.CURDIR}/../..
NOMAN= yep
KMOD= union
VFS_LKM= yes
SRCS= lkminit_vfs.c
SRCS+= union_vfsops.c union_vnops.c union_subr.c
.include <bsd.kmod.mk>

View File

@ -0,0 +1,72 @@
/* $NetBSD: lkminit_vfs.c,v 1.1 1996/08/22 20:19:02 explorer Exp $ */
/*
* Copyright (C) Michael Graff, 1996.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed for NetBSD by Michael Graff.
* 4. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/param.h>
#include <sys/ioctl.h>
#include <sys/systm.h>
#include <sys/conf.h>
#include <sys/mount.h>
#include <sys/exec.h>
#include <sys/lkm.h>
#include <sys/file.h>
#include <sys/errno.h>
/*
* This is the vfsops table for the file system in question
*/
extern struct vfsops union_vfsops;
extern struct vnodeopv_desc union_vnodeop_opv_desc;
/*
* declare the filesystem
*/
MOD_VFS("union", -1, &union_vfsops);
/*
* entry point
*/
int
union_lkmentry(lkmtp, cmd, ver)
struct lkm_table *lkmtp;
int cmd;
int ver;
{
/*
* This is normally done automatically at boot time if the
* opv_desc is listed in vfs_opv_descs[] in vfs_conf.c. For
* loaded modules, we have to do it manually.
*/
vfs_opv_init_explicit(&union_vnodeop_opv_desc);
vfs_opv_init_default(&union_vnodeop_opv_desc);
DISPATCH(lkmtp, cmd, ver, lkm_nofunc, lkm_nofunc, lkm_nofunc)
}

View File

@ -0,0 +1,14 @@
# $NetBSD: Makefile,v 1.1 1996/08/22 20:19:05 explorer Exp $
.PATH: /sys/msdosfs ${.CURDIR}/..
NOMAN= yep
KMOD= msdosfs
VFS_LKM= yes
SRCS= lkminit_vfs.c
SRCS+= msdosfs_conv.c msdosfs_denode.c msdosfs_fat.c msdosfs_lookup.c
SRCS+= msdosfs_vfsops.c msdosfs_vnops.c
.include <bsd.kmod.mk>

View File

@ -0,0 +1,72 @@
/* $NetBSD: lkminit_vfs.c,v 1.1 1996/08/22 20:19:07 explorer Exp $ */
/*
* Copyright (C) Michael Graff, 1996.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed for NetBSD by Michael Graff.
* 4. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/param.h>
#include <sys/ioctl.h>
#include <sys/systm.h>
#include <sys/conf.h>
#include <sys/mount.h>
#include <sys/exec.h>
#include <sys/lkm.h>
#include <sys/file.h>
#include <sys/errno.h>
/*
* This is the vfsops table for the file system in question
*/
extern struct vfsops msdosfs_vfsops;
extern struct vnodeopv_desc msdosfs_vnodeop_opv_desc;
/*
* declare the filesystem
*/
MOD_VFS("msdosfs", -1, &msdosfs_vfsops);
/*
* entry point
*/
int
msdosfs_lkmentry(lkmtp, cmd, ver)
struct lkm_table *lkmtp;
int cmd;
int ver;
{
/*
* This is normally done automatically at boot time if the
* opv_desc is listed in vfs_opv_descs[] in vfs_conf.c. For
* loaded modules, we have to do it manually.
*/
vfs_opv_init_explicit(&msdosfs_vnodeop_opv_desc);
vfs_opv_init_default(&msdosfs_vnodeop_opv_desc);
DISPATCH(lkmtp, cmd, ver, lkm_nofunc, lkm_nofunc, lkm_nofunc)
}

7
sys/lkm/vfs/ufs/Makefile Normal file
View File

@ -0,0 +1,7 @@
# $NetBSD: Makefile,v 1.1 1996/08/22 20:19:12 explorer Exp $
# MISSING: lfs (loads, but needs syscalls installed)
# ffs (untested, needs syscalls installed)
SUBDIR= mfs
.include <bsd.subdir.mk>

View File

@ -0,0 +1,14 @@
# $NetBSD: Makefile,v 1.1 1996/08/22 20:19:15 explorer Exp $
.PATH: /sys/ufs/ffs ${.CURDIR}/../..
NOMAN= yep
KMOD= ffs
VFS_LKM= yes
SRCS= lkminit_vfs.c
SRCS+= ffs_alloc.c ffs_balloc.c ffs_inode.c ffs_subr.c ffs_tables.c
SRCS+= ffs_vfsops.c ffs_vnops.c
.include <bsd.kmod.mk>

View File

@ -0,0 +1,72 @@
/* $NetBSD: lkminit_vfs.c,v 1.1 1996/08/22 20:19:18 explorer Exp $ */
/*
* Copyright (C) Michael Graff, 1996.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed for NetBSD by Michael Graff.
* 4. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/param.h>
#include <sys/ioctl.h>
#include <sys/systm.h>
#include <sys/conf.h>
#include <sys/mount.h>
#include <sys/exec.h>
#include <sys/lkm.h>
#include <sys/file.h>
#include <sys/errno.h>
/*
* This is the vfsops table for the file system in question
*/
extern struct vfsops ffs_vfsops;
extern struct vnodeopv_desc ffs_vnodeop_opv_desc;
/*
* declare the filesystem
*/
MOD_VFS("ffs", -1, &ffs_vfsops);
/*
* entry point
*/
int
ffs_lkmentry(lkmtp, cmd, ver)
struct lkm_table *lkmtp;
int cmd;
int ver;
{
/*
* This is normally done automatically at boot time if the
* opv_desc is listed in vfs_opv_descs[] in vfs_conf.c. For
* loaded modules, we have to do it manually.
*/
vfs_opv_init_explicit(&ffs_vnodeop_opv_desc);
vfs_opv_init_default(&ffs_vnodeop_opv_desc);
DISPATCH(lkmtp, cmd, ver, lkm_nofunc, lkm_nofunc, lkm_nofunc)
}

View File

@ -0,0 +1,15 @@
# $NetBSD: Makefile,v 1.1 1996/08/22 20:19:21 explorer Exp $
.PATH: /sys/ufs/lfs
NOMAN= yep
KMOD= lfs
VFS_LKM= yes
SRCS= lkminit_${KMOD}.c
SRCS+= lfs_vfsops.c lfs_vnops.c lfs_subr.c
SRCS+= lfs_alloc.c lfs_balloc.c lfs_bio.c lfs_cksum.c lfs_debug.c
SRCS+= lfs_inode.c lfs_segment.c lfs_syscalls.c
.include <bsd.kmod.mk>

View File

@ -0,0 +1,72 @@
/* $NetBSD: lkminit_lfs.c,v 1.1 1996/08/22 20:19:23 explorer Exp $ */
/*
* Copyright (C) Michael Graff, 1996.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed for NetBSD by Michael Graff.
* 4. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/param.h>
#include <sys/ioctl.h>
#include <sys/systm.h>
#include <sys/conf.h>
#include <sys/mount.h>
#include <sys/exec.h>
#include <sys/lkm.h>
#include <sys/file.h>
#include <sys/errno.h>
/*
* This is the vfsops table for the file system in question
*/
extern struct vfsops lfs_vfsops;
extern struct vnodeopv_desc lfs_vnodeop_opv_desc;
/*
* declare the filesystem
*/
MOD_VFS("lfs", -1, &lfs_vfsops);
/*
* entry point
*/
int
lfs_lkmentry(lkmtp, cmd, ver)
struct lkm_table *lkmtp;
int cmd;
int ver;
{
/*
* This is normally done automatically at boot time if the
* opv_desc is listed in vfs_opv_descs[] in vfs_conf.c. For
* loaded modules, we have to do it manually.
*/
vfs_opv_init_explicit(&lfs_vnodeop_opv_desc);
vfs_opv_init_default(&lfs_vnodeop_opv_desc);
DISPATCH(lkmtp, cmd, ver, lkm_nofunc, lkm_nofunc, lkm_nofunc)
}

View File

@ -0,0 +1,13 @@
# $NetBSD: Makefile,v 1.1 1996/08/22 20:19:26 explorer Exp $
.PATH: /sys/ufs/mfs ${.CURDIR}/../..
NOMAN= yep
KMOD= mfs
VFS_LKM= yes
SRCS= lkminit_vfs.c
SRCS+= mfs_vfsops.c mfs_vnops.c
.include <bsd.kmod.mk>

View File

@ -0,0 +1,72 @@
/* $NetBSD: lkminit_vfs.c,v 1.1 1996/08/22 20:19:29 explorer Exp $ */
/*
* Copyright (C) Michael Graff, 1996.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed for NetBSD by Michael Graff.
* 4. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/param.h>
#include <sys/ioctl.h>
#include <sys/systm.h>
#include <sys/conf.h>
#include <sys/mount.h>
#include <sys/exec.h>
#include <sys/lkm.h>
#include <sys/file.h>
#include <sys/errno.h>
/*
* This is the vfsops table for the file system in question
*/
extern struct vfsops mfs_vfsops;
extern struct vnodeopv_desc mfs_vnodeop_opv_desc;
/*
* declare the filesystem
*/
MOD_VFS("mfs", -1, &mfs_vfsops);
/*
* entry point
*/
int
mfs_lkmentry(lkmtp, cmd, ver)
struct lkm_table *lkmtp;
int cmd;
int ver;
{
/*
* This is normally done automatically at boot time if the
* opv_desc is listed in vfs_opv_descs[] in vfs_conf.c. For
* loaded modules, we have to do it manually.
*/
vfs_opv_init_explicit(&mfs_vnodeop_opv_desc);
vfs_opv_init_default(&mfs_vnodeop_opv_desc);
DISPATCH(lkmtp, cmd, ver, lkm_nofunc, lkm_nofunc, lkm_nofunc)
}