Subject: lfs_cleanerd doesn't compile
To: None <current-users@netbsd.org>
From: Kurt Schreiner <ks@ub.uni-mainz.de>
List: current-users
Date: 10/08/2007 23:28:13
Hi,
with sources cvs update'd some minutes ago I see the following
problem:
# compile lfs_cleanerd/lfs.o
/u/NetBSD/arch/i386/TOOLS/bin/i386--netbsdelf-gcc -O2 -pipe -mfpmath=sse -msse2 -march=pentium-m -fstack-protector -Wstack-protector --param ssp-buffer-size=1 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-sign-compare -Wno-traditional -Werror -I/u/NetBSD/src/sbin/fsck_lfs -nostdinc -isystem /u/NetBSD/arch/i386/dest/usr/include -D_FORTIFY_SOURCE=2 -c /u/NetBSD/src/sbin/fsck_lfs/lfs.c
/u/NetBSD/src/sbin/fsck_lfs/lfs.c: In function 'lfs_valloc':
/u/NetBSD/src/sbin/fsck_lfs/lfs.c:869: error: too many arguments to function 'brelse'
/u/NetBSD/src/sbin/fsck_lfs/lfs.c: In function 'extend_ifile':
/u/NetBSD/src/sbin/fsck_lfs/lfs.c:927: error: too many arguments to function 'brelse'
*** Failed target: lfs.o
In lines 869 and 927 above the macro LFS_GET_HEADFREE defined in
src/sys/ufs/lfs/lfs.h is called where the kernelland "brelse(BP, 0)" is
necessary, but in userland "brelse(bp)" as defind in
src/sbin/fsck_lfs/bufcache.c has to be used, if I interpret the code
correctly. Something like the following patch should do the trick:
(at least everthing seems to compile... ;-)
1140: cvs -z1 diff lfs.h
Index: lfs.h
===================================================================
RCS file: /cvsroot/src/sys/ufs/lfs/lfs.h,v
retrieving revision 1.121
diff -r1.121 lfs.h
553a554
> #ifdef _KERNEL
561a563,572
> #else
> #define LFS_GET_HEADFREE(FS, CIP, BP, FREEP) do { \
> if ((FS)->lfs_version > 1) { \
> LFS_CLEANERINFO((CIP), (FS), (BP)); \
> (FS)->lfs_freehd = (CIP)->free_head; \
> brelse(BP); \
> } \
> *(FREEP) = (FS)->lfs_freehd; \
> } while (0)
> #endif
Kurt