Subject: kern/9446: SOFTDEP option without FFS_EI failed to compile ffs_softdep.c.
To: None <gnats-bugs@gnats.netbsd.org>
From: Takahiro Kambe <taca@sky.yamashina.kyoto.jp>
List: netbsd-bugs
Date: 02/19/2000 10:11:24
>Number:         9446
>Category:       kern
>Synopsis:       SOFTDEP option without FFS_EI failed to compile ffs_softdep.c.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Feb 18 23:03:01 2000
>Last-Modified:
>Originator:     Takahiro Kambe
>Organization:
	
>Release:        NetBSD-current 2000/2/18
>Environment:
	
System: NetBSD ns.sky.yamashina.kyoto.jp 1.4T NetBSD 1.4T (NS) #95: Sat Feb 19 11:44:32 JST 2000 taca@ns.sky.yamashina.kyoto.jp:/usr/src/sys/arch/i386/compile/NS i386


>Description:
	SOFTDEP option without FFS_EI failed to compile ffs_softdep.c.
>How-To-Repeat:
	Try to compile a kernel with SOTFDEP option without FFS_EI.
>Fix:
	:

Index: gnu/sys/ufs/ffs/ffs_softdep.c
===================================================================
diff -u -r1.1.2.6 ffs_softdep.c
--- ffs_softdep.c	2000/02/15 23:00:12	1.1.2.6
+++ ffs_softdep.c	2000/02/19 06:52:50
@@ -1576,7 +1576,9 @@
 	struct buf *bp;
 	struct fs *fs = ip->i_fs;
 	int i, error;
+#ifdef FFS_EI
 	const int needswap = UFS_FSNEEDSWAP(fs);
+#endif
 
 	if (length != 0)
 		panic("softdep_setup_freeblocks: non-zero length");
@@ -1610,10 +1612,12 @@
 	    fsbtodb(fs, ino_to_fsba(fs, ip->i_number)),
 	    (int)fs->fs_bsize, NOCRED, &bp)) != 0)
 		softdep_error("softdep_setup_freeblocks", error);
+#ifdef FFS_EI
 	if (needswap)
 		ffs_dinode_swap(&ip->i_din.ffs_din,
 		    (struct dinode *)bp->b_data+ino_to_fsbo(fs, ip->i_number));
 	else
+#endif
 		*((struct dinode *)bp->b_data + ino_to_fsbo(fs, ip->i_number)) =
 		    ip->i_din.ffs_din;
 	/*

>Audit-Trail:
>Unformatted: