From owner-freebsd-ports-bugs@FreeBSD.ORG Sat May 23 18:50:01 2009 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 971B51065672 for ; Sat, 23 May 2009 18:50:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 71A078FC17 for ; Sat, 23 May 2009 18:50:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n4NIo1Xs088369 for ; Sat, 23 May 2009 18:50:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n4NIo1Zp088368; Sat, 23 May 2009 18:50:01 GMT (envelope-from gnats) Resent-Date: Sat, 23 May 2009 18:50:01 GMT Resent-Message-Id: <200905231850.n4NIo1Zp088368@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Tom McLaughlin Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 481FC1065672; Sat, 23 May 2009 18:45:14 +0000 (UTC) (envelope-from tmclaugh@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 357848FC20; Sat, 23 May 2009 18:45:14 +0000 (UTC) (envelope-from tmclaugh@FreeBSD.org) Received: from freefall.freebsd.org (tmclaugh@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n4NIjE3c088256; Sat, 23 May 2009 18:45:14 GMT (envelope-from tmclaugh@freefall.freebsd.org) Received: (from tmclaugh@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n4NIjEPu088255; Sat, 23 May 2009 18:45:14 GMT (envelope-from tmclaugh) Message-Id: <200905231845.n4NIjEPu088255@freefall.freebsd.org> Date: Sat, 23 May 2009 18:45:14 GMT From: Tom McLaughlin To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: mbr@FreeBSD.org Subject: ports/134879: emulators/open-vm-tools: Fix build on -CURRENT after recent VFS layer changes. X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Tom McLaughlin List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 May 2009 18:50:01 -0000 >Number: 134879 >Category: ports >Synopsis: emulators/open-vm-tools: Fix build on -CURRENT after recent VFS layer changes. >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat May 23 18:50:01 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Tom McLaughlin >Release: FreeBSD 7.1-PRERELEASE i386 >Organization: >Environment: System: FreeBSD freefall.freebsd.org 7.1-PRERELEASE FreeBSD 7.1-PRERELEASE #36: Mon Dec 29 15:15:30 UTC 2008 simon@freefall.freebsd.org:/usr/src/sys/i386/compile/FREEFALL i386 >Description: Port fails to build on -CURRENT after revision 191990 [1] due to changes in the OS vfs layer. [1] http://svn.freebsd.org/viewvc/base?view=revision&revision=191990 >How-To-Repeat: Build port on -CURRENT after revision 191990. >Fix: --- open-vm-tools.diff begins here --- Index: files/patch-freebsd-8 =================================================================== RCS file: /ncvs/ports/emulators/open-vm-tools/files/patch-freebsd-8,v retrieving revision 1.2 diff -u -r1.2 patch-freebsd-8 --- files/patch-freebsd-8 6 Apr 2009 14:57:03 -0000 1.2 +++ files/patch-freebsd-8 23 May 2009 07:05:07 -0000 @@ -1,17 +1,3 @@ ---- modules/freebsd/vmhgfs/vfsops.c.orig 2009-02-28 23:15:30.000000000 +0100 -+++ modules/freebsd/vmhgfs/vfsops.c 2009-02-28 23:16:38.000000000 +0100 -@@ -145,7 +145,11 @@ - * Since Hgfs requires the caller to be root, only allow mount attempts made - * by the superuser. - */ -+#if __FreeBSD_version >= 800001 -+ if ((ret = priv_check(td, PRIV_VFS_MOUNT)) != 0) { -+#else - if ((ret = suser(td)) != 0) { -+#endif - return ret; - } - --- modules/freebsd/vmhgfs/vnops.c.orig 2009-02-18 17:02:35.000000000 +0900 +++ modules/freebsd/vmhgfs/vnops.c 2009-03-01 17:47:10.000000000 +0900 @@ -325,7 +325,11 @@ @@ -53,3 +39,245 @@ /* * Disallow write attempts on read-only layers; unless the file is a +--- modules/freebsd/vmblock/vfsops.c.orig 2009-03-18 03:03:21.000000000 -0400 ++++ modules/freebsd/vmblock/vfsops.c 2009-05-23 02:25:50.892549675 -0400 +@@ -113,8 +113,12 @@ + */ + + static int ++#if __FreeBSD_version >= 800087 ++VMBlockVFSMount(struct mount *mp) ++#else + VMBlockVFSMount(struct mount *mp, // IN: mount(2) parameters + struct thread *td) // IN: caller's kernel thread context ++#endif + { + struct VMBlockMount *xmp; + struct nameidata nd, *ndp = &nd; +@@ -122,6 +126,11 @@ + char *target; + int len, error = 0; + ++#if __FreeBSD_version >= 800087 ++ struct thread *td; ++ td = curthread; ++#endif ++ + VMBLOCKDEBUG("VMBlockVFSMount(mp = %p)\n", (void *)mp); + + /* +@@ -253,9 +262,14 @@ + */ + + static int ++#if __FreeBSD_version >= 800087 ++VMBlockVFSUnmount(struct mount *mp, ++ int mntflags) ++#else + VMBlockVFSUnmount(struct mount *mp, // IN: filesystem to unmount + int mntflags, // IN: unmount(2) flags (ex: MNT_FORCE) + struct thread *td) // IN: caller's kernel thread context ++#endif + { + struct VMBlockMount *xmp; + struct vnode *vp; +@@ -263,6 +277,11 @@ + int error; + int flags = 0, removed = 0; + ++#if __FreeBSD_version >= 800087 ++ struct thread *td; ++ td = curthread; ++#endif ++ + VMBLOCKDEBUG("VMBlockVFSUnmount: mp = %p\n", (void *)mp); + + xmp = MNTTOVMBLOCKMNT(mp); +@@ -336,13 +355,24 @@ + */ + + static int ++#if __FreeBSD_version >= 800087 ++VMBlockVFSRoot(struct mount *mp, ++ int flags, ++ struct vnode **vpp) ++#else + VMBlockVFSRoot(struct mount *mp, // IN: vmblock file system + int flags, // IN: lockmgr(9) flags + struct vnode **vpp, // OUT: root vnode + struct thread *td) // IN: caller's thread context ++#endif + { + struct vnode *vp; + ++#if __FreeBSD_version >= 800087 ++ struct thread *td; ++ td = curthread; ++#endif ++ + /* + * Return locked reference to root. + */ +@@ -373,12 +403,21 @@ + */ + + static int ++#if __FreeBSD_version >= 800087 ++VMBlockVFSStatFS(struct mount *mp, ++ struct statfs *sbp) ++#else + VMBlockVFSStatFS(struct mount *mp, // IN: vmblock file system + struct statfs *sbp, // OUT: statfs(2) arg container + struct thread *td) // IN: caller's thread context ++#endif + { + int error; + struct statfs mstat; ++#if __FreeBSD_version >= 800087 ++ struct thread *td; ++ td = curthread; ++#endif + + VMBLOCKDEBUG("VMBlockVFSStatFS(mp = %p, vp = %p->%p)\n", (void *)mp, + (void *)MNTTOVMBLOCKMNT(mp)->rootVnode, +@@ -386,7 +425,11 @@ + + bzero(&mstat, sizeof mstat); + ++#if __FreeBSD_version >= 800087 ++ error = VFS_STATFS(MNTTOVMBLOCKMNT(mp)->mountVFS, &mstat); ++#else + error = VFS_STATFS(MNTTOVMBLOCKMNT(mp)->mountVFS, &mstat, td); ++#endif + if (error) { + return error; + } +@@ -423,9 +466,14 @@ + */ + + static int ++#if __FreeBSD_version >= 800087 ++VMBlockVFSSync(struct mount *mp, ++ int waitfor) ++#else + VMBlockVFSSync(struct mount *mp, // Ignored + int waitfor, // Ignored + struct thread *td) // Ignored ++#endif + { + return 0; + } +--- modules/freebsd/vmhgfs/vfsops.c.orig 2009-03-18 03:03:26.000000000 -0400 ++++ modules/freebsd/vmhgfs/vfsops.c 2009-05-23 02:56:39.608109670 -0400 +@@ -109,8 +109,12 @@ + */ + + static int ++#if __FreeBSD_version >= 800087 ++HgfsVfsMount(struct mount *mp) ++#else + HgfsVfsMount(struct mount *mp, // IN: structure representing the file system + struct thread *td) // IN: thread which is mounting the file system ++#endif + { + HgfsSuperInfo *sip; + struct vnode *vp; +@@ -122,6 +126,10 @@ + int *uid = NULL; + Bool *gidSet = NULL; + int *gid = NULL; ++#if __FreeBSD_version >= 800087 ++ struct thread *td; ++ td = curthread; ++#endif + + /* + * - Examine/validate mount flags from userland. +@@ -145,7 +153,11 @@ + * Since Hgfs requires the caller to be root, only allow mount attempts made + * by the superuser. + */ ++#if __FreeBSD_version >= 800001 ++ if ((ret = priv_check(td, PRIV_VFS_MOUNT)) != 0) { ++#else + if ((ret = suser(td)) != 0) { ++#endif + return ret; + } + +@@ -277,11 +289,19 @@ + */ + + static int ++#if __FreeBSD_version >= 800087 ++HgfsVfsUnmount(struct mount *mp, int mntflags) ++#else + HgfsVfsUnmount(struct mount *mp, int mntflags, struct thread *td) ++#endif + { + HgfsSuperInfo *sip; + int ret = 0; + int flags = 0; ++#if __FreeBSD_version >= 800087 ++ struct thread *td; ++ td = curthread; ++#endif + + sip = (HgfsSuperInfo *)mp->mnt_data; + +@@ -348,10 +368,18 @@ + */ + + static int ++#if __FreeBSD_version >= 800087 ++HgfsVfsStatfs(struct mount *mp, struct statfs *sbp) ++#else + HgfsVfsStatfs(struct mount *mp, struct statfs *sbp, struct thread *td) ++#endif + { + int ret = 0; + struct vnode *vp; ++#if __FreeBSD_version >= 800087 ++ struct thread *td; ++ td = curthread; ++#endif + + /* We always want HGFS_BLOCKSIZE to be a power of two */ + ASSERT_ON_COMPILE(HGFS_IS_POWER_OF_TWO(HGFS_BLOCKSIZE)); +@@ -361,8 +389,11 @@ + * we got from a call to vfs_getnewfsid() in HgfsVfsMount() + */ + bcopy(&mp->mnt_stat, sbp, sizeof mp->mnt_stat); +- ++#if __FreeBSD_version >= 800087 ++ ret = HgfsVfsRoot(mp, LK_SHARED, &vp); ++#else + ret = HgfsVfsRoot(mp, LK_SHARED, &vp, td); ++#endif + if (ret) { + DEBUG(VM_DEBUG_FAIL, "HgfsVfsRoot failed\n"); + return ret; +@@ -397,13 +428,23 @@ + */ + + static int ++#if __FreeBSD_version >= 800087 ++HgfsVfsRoot(struct mount *mp, ++ int flags, ++ struct vnode **vpp) ++#else + HgfsVfsRoot(struct mount *mp, // IN: Filesystem structure + int flags, // IN: Flags to vget + struct vnode **vpp, // OUT: Address of root vnode + struct thread *td) // IN: Thread structure ++#endif + { + HgfsSuperInfo *sip = (HgfsSuperInfo *)mp->mnt_data; + int ret = 0; ++#if __FreeBSD_version >= 800087 ++ struct thread *td; ++ td = curthread; ++#endif + + *vpp = NULL; + --- open-vm-tools.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: