svn commit: r544846 - in head/emulators: virtualbox-ose-additions virtualbox-ose/files

Jung-uk Kim jkim at FreeBSD.org
Thu Aug 13 21:55:00 UTC 2020


Author: jkim
Date: Thu Aug 13 21:54:59 2020
New Revision: 544846
URL: https://svnweb.freebsd.org/changeset/ports/544846

Log:
  Remove unncessary memcpy(3) and fix file system ID handling.
  
  I removed a bzero() call to reduce compiler warnings in the previous commit
  (r544829).  It turned out the next memcpy() call was also wrong.  Just use
  natural assignments here not to obfuscate the code.
  
  Reported by:	Martin Simmons (martin at lispworks dot com) (some time ago)

Modified:
  head/emulators/virtualbox-ose-additions/Makefile
  head/emulators/virtualbox-ose/files/patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vfsops.c

Modified: head/emulators/virtualbox-ose-additions/Makefile
==============================================================================
--- head/emulators/virtualbox-ose-additions/Makefile	Thu Aug 13 21:43:07 2020	(r544845)
+++ head/emulators/virtualbox-ose-additions/Makefile	Thu Aug 13 21:54:59 2020	(r544846)
@@ -3,6 +3,7 @@
 
 PORTNAME=	virtualbox-ose
 PORTVERSION=	5.2.44
+PORTREVISION=	1
 CATEGORIES=	emulators
 MASTER_SITES=	https://download.oracle.com/virtualbox/${PORTVERSION}/
 PKGNAMESUFFIX?=	-additions

Modified: head/emulators/virtualbox-ose/files/patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vfsops.c
==============================================================================
--- head/emulators/virtualbox-ose/files/patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vfsops.c	Thu Aug 13 21:43:07 2020	(r544845)
+++ head/emulators/virtualbox-ose/files/patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vfsops.c	Thu Aug 13 21:54:59 2020	(r544846)
@@ -451,8 +451,8 @@
 +
 +	MNT_ILOCK(mp);
 +	mp->mnt_data = vboxfsmp;
-+	/* f_fsid is int32_t but serial is uint32_t, convert */
-+	memcpy(&mp->mnt_stat.f_fsid, &fsinfo.serial, sizeof(mp->mnt_stat.f_fsid));
++	mp->mnt_stat.f_fsid.val[0] = fsinfo.serial;
++	mp->mnt_stat.f_fsid.val[1] = 0;
 +	mp->mnt_flag |= MNT_LOCAL;
 +	if (readonly != 0)
 +		mp->mnt_flag |= MNT_RDONLY;


More information about the svn-ports-all mailing list