Subject: netbsd-4 build failure - veriexec_unmountchk()
To: NetBSD current-users <current-users@NetBSD.org>
From: Paul Ripke <stix@stix.id.au>
List: current-users
Date: 01/20/2007 22:35:18
From CVS netbsd-4 branch:

#   compile  GENERIC/kern_verifiedexec.o
/export/netbsd/netbsd-4/tools.i386/bin/i386--netbsdelf-gcc -pipe -ffreestanding -fno-zero-initialized-in-bss -march=i486 -mtune=pentiumpro -O2 -Werror -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wno-sign-compare -Wno-pointer-sign -Wno-attributes -Wextra -Wno-unused-parameter -fno-strict-aliasing -Di386 -I. -I/export/netbsd/netbsd-4/src/sys/contrib/dev/ath/netbsd -I/export/netbsd/netbsd-4/src/sys/../common/include -I/export/netbsd/netbsd-4/src/sys/arch -I/export/netbsd/netbsd-4/src/sys -nostdinc -DLKM -DMAXUSERS=32 -D_KERNEL -D_KERNEL_OPT -I/export/netbsd/netbsd-4/src/sys/lib/libkern/../../../common/lib/libc/quad -I/export/netbsd/netbsd-4/src/sys/lib/libkern/../../../common/lib/libc/string -I/export/netbsd/netbsd-4/src/sys/lib/libkern/../../../common/lib/libc/arch/i386/string -I/export/netbsd/netbsd-4/src/sys/dist/ipf -c /export/netbsd/netbsd-4/src/sys/kern/kern_verifiedexec.c
cc1: warnings being treated as errors
/export/netbsd/netbsd-4/src/sys/kern/kern_verifiedexec.c: In function 'veriexec_unmountchk':
/export/netbsd/netbsd-4/src/sys/kern/kern_verifiedexec.c:1176: warning: passing argument 1 of 'veriexec_table_delete' from incompatible pointer type
/export/netbsd/netbsd-4/src/sys/kern/kern_verifiedexec.c:1176: error: too few arguments to function 'veriexec_table_delete'

*** Failed target:  kern_verifiedexec.o

The following (untested) patch from -current at least allows the
compile to proceed:

RCS file: /usr/netbsd/cvsroot/src/sys/kern/kern_verifiedexec.c,v
retrieving revision 1.78.2.7
diff -u -d -b -w -r1.78.2.7 kern_verifiedexec.c
--- kern_verifiedexec.c 19 Jan 2007 22:12:50 -0000      1.78.2.7
+++ kern_verifiedexec.c 20 Jan 2007 11:15:07 -0000
@@ -1173,7 +1173,7 @@
        switch (veriexec_strict) {
        case VERIEXEC_LEARNING:
        case VERIEXEC_IDS:
-               if (veriexec_table_delete(mp) == 0) {
+               if (veriexec_table_lookup(mp) != NULL) {
                        log(LOG_INFO, "Veriexec: IDS mode, allowing  unmount "
                            "of \"%s\".\n", mp->mnt_stat.f_mntonname);
                }


-- 
stix