Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 May 2020 13:33:36 -0700
From:      John-Mark Gurney <jmg@funkthat.com>
To:        vbox@FreeBSD.org, mjg@FreeBSD.org
Cc:        freebsd-virtualization@freebsd.org
Subject:   patch to make vboxvfs work again
Message-ID:  <20200509203336.GN4213@funkthat.com>

next in thread | raw e-mail | index | archive | help

--j/HO4hzKTNbM1mOX
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hello virtualbox maintainer(s),

Attached is a patch to make VirtualBox vboxvfs work again.  I've only
tested under -current.

mjg, what is the correct way to make this patch work on past versions
of FreeBSD?  would a simple #ifdef VFS_VOP_VECTOR_REGISTER wrapper
around the call work?

Thanks.

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."

--j/HO4hzKTNbM1mOX
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="virtualbox-ose.patch"

Index: virtualbox-ose/files/patch-src_VBox_Additions_freebsd_vboxvfs_Makefile.kmk
===================================================================
--- virtualbox-ose/files/patch-src_VBox_Additions_freebsd_vboxvfs_Makefile.kmk	(revision 534710)
+++ virtualbox-ose/files/patch-src_VBox_Additions_freebsd_vboxvfs_Makefile.kmk	(working copy)
@@ -1,8 +1,10 @@
---- src/VBox/Additions/freebsd/vboxvfs/Makefile.kmk.orig	2017-04-28 16:59:22.000000000 +0200
-+++ src/VBox/Additions/freebsd/vboxvfs/Makefile.kmk	2017-07-13 00:52:49.020669620 +0200
-@@ -33,32 +33,36 @@
+--- src/VBox/Additions/freebsd/vboxvfs/Makefile.kmk.orig	2019-10-10 18:06:51.000000000 +0000
++++ src/VBox/Additions/freebsd/vboxvfs/Makefile.kmk	2020-05-09 06:51:51.411749000 +0000
+@@ -32,33 +32,38 @@
+         . \
         $(vboxvfs_0_OUTDIR)
  vboxvfs_SOURCES       = \
++	bcmp.c \
  	vboxvfs_vfsops.c \
 -	vboxvfs_vnops.c
 +	vboxvfs_vnops.c \
Index: virtualbox-ose/files/patch-src_VBox_Additions_freebsd_vboxvfs_bcmp.c
===================================================================
--- virtualbox-ose/files/patch-src_VBox_Additions_freebsd_vboxvfs_bcmp.c	(nonexistent)
+++ virtualbox-ose/files/patch-src_VBox_Additions_freebsd_vboxvfs_bcmp.c	(working copy)
@@ -0,0 +1,12 @@
+--- src/VBox/Additions/freebsd/vboxvfs/bcmp.c.orig	2020-05-09 06:57:06.229140000 +0000
++++ src/VBox/Additions/freebsd/vboxvfs/bcmp.c	2020-05-09 06:54:55.886751000 +0000
+@@ -0,0 +1,9 @@
++#include <sys/types.h>
++
++int bcmp(const void *b1, const void *b2, size_t len);
++
++int
++bcmp(const void *b1, const void *b2, size_t len)
++{
++	return __builtin_memcmp((b1), (b2), (len));
++}

Property changes on: virtualbox-ose/files/patch-src_VBox_Additions_freebsd_vboxvfs_bcmp.c
___________________________________________________________________
Added: fbsd:nokeywords
## -0,0 +1 ##
+yes
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: virtualbox-ose/files/patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vnops.c
===================================================================
--- virtualbox-ose/files/patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vnops.c	(revision 534793)
+++ virtualbox-ose/files/patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vnops.c	(working copy)
@@ -1,5 +1,5 @@
---- src/VBox/Additions/freebsd/vboxvfs/vboxvfs_vnops.c.orig	2019-10-10 18:06:51 UTC
-+++ src/VBox/Additions/freebsd/vboxvfs/vboxvfs_vnops.c
+--- src/VBox/Additions/freebsd/vboxvfs/vboxvfs_vnops.c.orig	2019-10-10 18:06:51.000000000 +0000
++++ src/VBox/Additions/freebsd/vboxvfs/vboxvfs_vnops.c	2020-05-09 07:07:49.485808000 +0000
 @@ -1,10 +1,6 @@
 -/* $Id: vboxvfs_vnops.c $ */
 -/** @file
@@ -12,7 +12,7 @@
   *
   * This file is part of VirtualBox Open Source Edition (OSE), as
   * available from http://www.virtualbox.org. This file is free software;
-@@ -14,228 +10,1338 @@
+@@ -14,228 +10,1339 @@
   * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
   * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
   */
@@ -172,6 +172,7 @@
 +	.vop_write	= vboxfs_write,
 +	.vop_bmap	= VOP_EOPNOTSUPP
  };
++VFS_VOP_VECTOR_REGISTER(vboxfs_vnodeops);
  
 -static int vboxvfs_access(struct vop_access_args *ap)
 +static uint64_t

--j/HO4hzKTNbM1mOX--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200509203336.GN4213>