From nobody@FreeBSD.ORG  Sun Jul  9 08:35:10 2000
Return-Path: <nobody@FreeBSD.ORG>
Received: by hub.freebsd.org (Postfix, from userid 32767)
	id 19E5D37B844; Sun,  9 Jul 2000 08:35:10 -0700 (PDT)
Message-Id: <20000709153510.19E5D37B844@hub.freebsd.org>
Date: Sun,  9 Jul 2000 08:35:10 -0700 (PDT)
From: nm@web.am
Sender: nobody@FreeBSD.ORG
To: freebsd-gnats-submit@FreeBSD.org
Subject: Ext2fs kld module submission
X-Send-Pr-Version: www-1.0

>Number:         19803
>Category:       kern
>Synopsis:       Ext2fs kld module submission
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jul 09 08:40:03 PDT 2000
>Closed-Date:    Mon Jul 10 04:14:40 PDT 2000
>Last-Modified:  Mon Jul 10 04:18:57 PDT 2000
>Originator:     Gaspar Chilingarov
>Release:        FreeBSD 5.0-current
>Organization:
WEB Ltd., http://www.web.am
>Environment:
FreeBSD nightmar.web.am 5.0-CURRENT FreeBSD 5.0-CURRENT #4: Sat Jul  8 15:21:04
GMT 2000     root@nightmar.web.am:/usr/src/sys/compile/nm  i386

>Description:
Just loadable version of ext2fs driver to get rid of EXT2FS from kernel :)

sorry for inconvient form of supplying patch, but all my mails got rejected because of absent reverse DNS record.

>How-To-Repeat:

>Fix:
Apply this patch in /usr/src/sys/gnu/ext2fs

--cut--
--- ext2_readwrite.c.orig       Sun Jul  9 20:39:57 2000
+++ ext2_readwrite.c    Sun Jul  9 19:52:50 2000
@@ -48,6 +48,36 @@
 #define        WRITE                   ext2_write
 #define        WRITE_S                 "ext2_write"
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/resourcevar.h>
+#include <sys/kernel.h>
+#include <sys/stat.h>
+#include <sys/bio.h>
+#include <sys/buf.h>
+#include <sys/proc.h>
+#include <sys/mount.h>
+#include <sys/time.h>
+#include <sys/vnode.h>
+#include <sys/namei.h>
+
+#include <vm/vm.h>
+#include <vm/vm_extern.h>
+#include <vm/vnode_pager.h>
+
+#include <sys/signalvar.h>
+#include <ufs/ufs/dir.h>
+#include <ufs/ufs/extattr.h>
+#include <ufs/ufs/quota.h>
+#include <ufs/ufs/inode.h>
+#include <ufs/ufs/ufsmount.h>
+#include <ufs/ufs/ufs_extern.h>
+
+#include <gnu/ext2fs/ext2_fs_sb.h>
+#include <gnu/ext2fs/fs.h>
+#include <gnu/ext2fs/ext2_extern.h>
+#include <gnu/ext2fs/ext2_fs.h>
+
 /*
  * Vnode op for reading.
  */
--cut--

and put this Makefile into /sys/modules/ext2fs
--cut--
.PATH:  ${.CURDIR}/../../gnu/ext2fs
KMOD=   ext2fs
SRCS=   vnode_if.h \
    opt_quota.h \
    opt_ddb.h \
    opt_suiddir.h \
    ext2_inode.c \
    ext2_alloc.c \
    ext2_balloc.c \
    ext2_extern.h \
    ext2_fs.h \
    ext2_fs_sb.h \
    ext2_inode_cnv.c \
    ext2_linux_balloc.c \
    ext2_linux_ialloc.c \
    ext2_lookup.c \
    ext2_readwrite.c \
    ext2_subr.c \
    ext2_vfsops.c \
    ext2_vnops.c \
    fs.h \
    i386-bitops.h
NOMAN=
.include <bsd.kmod.mk>
--cut--


>Release-Note:
>Audit-Trail:

From: Bruce Evans <bde@zeta.org.au>
To: nm@web.am
Cc: freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: kern/19803: Ext2fs kld module submission
Date: Mon, 10 Jul 2000 20:37:20 +1000 (EST)

 > >Description:
 > Just loadable version of ext2fs driver to get rid of EXT2FS from kernel :)
 
 There is already an open PR about this (PR 14217).  I think shipping
 GPLed modules would result in the whole kernel being covered by the
 GPL, so the ext2fs module would have to be built specially to keep it
 out of distributions.
 
 > --- ext2_readwrite.c.orig       Sun Jul  9 20:39:57 2000
 > +++ ext2_readwrite.c    Sun Jul  9 19:52:50 2000
 > @@ -48,6 +48,36 @@
 >  #define        WRITE                   ext2_write
 >  #define        WRITE_S                 "ext2_write"
 > +#include <sys/param.h>
 > +#include <sys/systm.h>
 > ...
 
 This is bogus.  ext2_readwrite.c is not a standalone file.  It is included
 by ext2_vnops.c for historical reasons (the ufs version of it was once
 shared by ffs and lfs).  The bogusness only wastes space, since
 ext2fs_readwite.c only contains static functions, so the functions don't
 conflict with the ones in ext2_vnops.c.
 
 Bruce
 
 
State-Changed-From-To: open->closed 
State-Changed-By: bde 
State-Changed-When: Mon Jul 10 04:14:40 PDT 2000 
State-Changed-Why:  
Essentially a duplicate of PR 14217. 
Closed at originator's request. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=19803 
>Unformatted:
