diff options
author | dyson <dyson@FreeBSD.org> | 1997-02-10 02:22:35 +0000 |
---|---|---|
committer | dyson <dyson@FreeBSD.org> | 1997-02-10 02:22:35 +0000 |
commit | 10f666af84d48e89e4e2960415c9b616fce4077f (patch) | |
tree | 88a944de263165091f0a18abeedbaaccec532407 /sys/ufs/ffs/ffs_subr.c | |
parent | 0960d7e91af3428ffba89b42228d82d8afaa0389 (diff) | |
download | FreeBSD-src-10f666af84d48e89e4e2960415c9b616fce4077f.zip FreeBSD-src-10f666af84d48e89e4e2960415c9b616fce4077f.tar.gz |
This is the kernel Lite/2 commit. There are some requisite userland
changes, so don't expect to be able to run the kernel as-is (very well)
without the appropriate Lite/2 userland changes.
The system boots and can mount UFS filesystems.
Untested: ext2fs, msdosfs, NFS
Known problems: Incorrect Berkeley ID strings in some files.
Mount_std mounts will not work until the getfsent
library routine is changed.
Reviewed by: various people
Submitted by: Jeffery Hsu <hsu@freebsd.org>
Diffstat (limited to 'sys/ufs/ffs/ffs_subr.c')
-rw-r--r-- | sys/ufs/ffs/ffs_subr.c | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/sys/ufs/ffs/ffs_subr.c b/sys/ufs/ffs/ffs_subr.c index 1cb9f3f..629a228 100644 --- a/sys/ufs/ffs/ffs_subr.c +++ b/sys/ufs/ffs/ffs_subr.c @@ -30,22 +30,26 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)ffs_subr.c 8.2 (Berkeley) 9/21/93 + * @(#)ffs_subr.c 8.5 (Berkeley) 3/21/95 * $FreeBSD$ */ #include <sys/param.h> -#include <ufs/ffs/fs.h> -#ifdef KERNEL +#ifndef KERNEL +#include <ufs/ufs/dinode.h> +#include <ufs/ffs/fs.h> +#else #include "opt_ddb.h" #include <sys/systm.h> #include <sys/vnode.h> -#include <ufs/ffs/ffs_extern.h> #include <sys/buf.h> #include <ufs/ufs/quota.h> #include <ufs/ufs/inode.h> +#include <ufs/ufs/dinode.h> +#include <ufs/ffs/fs.h> +#include <ufs/ffs/ffs_extern.h> /* * Return buffer with the contents of block "offset" from the beginning of @@ -64,7 +68,7 @@ ffs_blkatoff(ap) struct inode *ip; register struct fs *fs; struct buf *bp; - daddr_t lbn; + ufs_daddr_t lbn; int bsize, error; ip = VTOI(ap->a_vp); @@ -93,7 +97,7 @@ void ffs_fragacct(fs, fragmap, fraglist, cnt) struct fs *fs; int fragmap; - long fraglist[]; + int32_t fraglist[]; int cnt; { int inblk; @@ -127,7 +131,7 @@ ffs_checkoverlap(bp, ip) struct inode *ip; { register struct buf *ebp, *ep; - register daddr_t start, last; + register ufs_daddr_t start, last; struct vnode *vp; ebp = &buf[nbuf]; @@ -137,7 +141,8 @@ ffs_checkoverlap(bp, ip) if (ep == bp || (ep->b_flags & B_INVAL) || ep->b_vp == NULLVP) continue; - if (VOP_BMAP(ep->b_vp, (daddr_t)0, &vp, (daddr_t)0, NULL, NULL)) + if (VOP_BMAP(ep->b_vp, (ufs_daddr_t)0, &vp, (ufs_daddr_t)0, + NULL)) continue; if (vp != ip->i_devvp) continue; @@ -163,7 +168,7 @@ int ffs_isblock(fs, cp, h) struct fs *fs; unsigned char *cp; - daddr_t h; + ufs_daddr_t h; { unsigned char mask; @@ -191,7 +196,7 @@ void ffs_clrblock(fs, cp, h) struct fs *fs; u_char *cp; - daddr_t h; + ufs_daddr_t h; { switch ((int)fs->fs_frag) { @@ -219,7 +224,7 @@ void ffs_setblock(fs, cp, h) struct fs *fs; unsigned char *cp; - daddr_t h; + ufs_daddr_t h; { switch ((int)fs->fs_frag) { |