Date: Wed, 24 May 2006 21:38:02 GMT From: John Baldwin <jhb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 97768 for review Message-ID: <200605242138.k4OLc2mb072820@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=97768 Change 97768 by jhb@jhb_mutex on 2006/05/24 21:37:19 Various compile fixes. I had to turn off GPROF in winx32_wrap.S because it uses non-0xc3 ret instructions in two places and GPROF was giving it heartache. The winx64_wrap.S does not have the same issue so I have left it alone. Affected files ... .. //depot/projects/smpng/sys/compat/ndis/subr_ndis.c#38 edit .. //depot/projects/smpng/sys/compat/ndis/winx32_wrap.S#4 edit .. //depot/projects/smpng/sys/security/audit/audit_syscalls.c#4 edit Differences ... ==== //depot/projects/smpng/sys/compat/ndis/subr_ndis.c#38 (text+ko) ==== @@ -2894,7 +2894,7 @@ /* * See if a single module contains the symbols for a specified file. */ -static void +static int NdisCheckModule(linker_file_t lf, void *context) { struct ndis_checkmodule *nc; @@ -2908,7 +2908,7 @@ nc->fh->nf_vp = lf; nc->fh->nf_map = NULL; nc->fh->nf_type = NDIS_FH_TYPE_MODULE; - cn->fh->nf_maplen = (kldend - kldstart) & 0xFFFFFFFF; + nc->fh->nf_maplen = (kldend - kldstart) & 0xFFFFFFFF; return (1); } @@ -2931,7 +2931,6 @@ ndis_fh *fh; char *path; struct ndis_checkmodule nc; - linker_file_t head, lf; if (RtlUnicodeStringToAnsiString(&as, filename, TRUE)) { *status = NDIS_STATUS_RESOURCES; @@ -3051,6 +3050,7 @@ linker_file_t lf; caddr_t kldstart; int error, resid, vfslocked; + struct vnode *vp; if (filehandle == NULL) { *status = NDIS_STATUS_FAILURE; @@ -3088,8 +3088,9 @@ return; } + vp = fh->nf_vp; vfslocked = VFS_LOCK_GIANT(vp->v_mount); - error = vn_rdwr(UIO_READ, fh->nf_vp, fh->nf_map, fh->nf_maplen, 0, + error = vn_rdwr(UIO_READ, vp, fh->nf_map, fh->nf_maplen, 0, UIO_SYSSPACE, 0, td->td_ucred, NOCRED, &resid, td); VFS_UNLOCK_GIANT(vfslocked); @@ -3127,6 +3128,7 @@ struct thread *td = curthread; ndis_fh *fh; int vfslocked; + struct vnode *vp; if (filehandle == NULL) return; @@ -3142,8 +3144,9 @@ return; if (fh->nf_type == NDIS_FH_TYPE_VFS) { + vp = fh->nf_vp; vfslocked = VFS_LOCK_GIANT(vp->v_mount); - vn_close(fh->nf_vp, FREAD, td->td_ucred, td); + vn_close(vp, FREAD, td->td_ucred, td); VFS_UNLOCK_GIANT(vfslocked); } ==== //depot/projects/smpng/sys/compat/ndis/winx32_wrap.S#4 (text+ko) ==== @@ -32,6 +32,11 @@ * $FreeBSD: src/sys/compat/ndis/winx32_wrap.S,v 1.4 2005/11/02 18:01:04 wpaul Exp $ */ +/* The 'ret' macro doesn't work in this file if GPROF is enabled. */ +#ifdef GPROF +#undef GPROF +#endif + #include <machine/asmacros.h> /* ==== //depot/projects/smpng/sys/security/audit/audit_syscalls.c#4 (text) ==== @@ -30,6 +30,7 @@ */ #include <sys/param.h> +#include <sys/mount.h> #include <sys/namei.h> #include <sys/proc.h> #include <sys/sysproto.h>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200605242138.k4OLc2mb072820>