Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Aug 2013 11:33:32 GMT
From:      oleksandr@FreeBSD.org
To:        svn-soc-all@FreeBSD.org
Subject:   socsvn commit: r255839 - soc2013/oleksandr/ports/emulators/virtualbox-ose-additions/files
Message-ID:  <201308121133.r7CBXW74088452@socsvn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: oleksandr
Date: Mon Aug 12 11:33:32 2013
New Revision: 255839
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=255839

Log:
  Delete unused include's and fixed operation with dirent structure

Modified:
  soc2013/oleksandr/ports/emulators/virtualbox-ose-additions/files/patch-src-VBox-Additions-freebsd.kmk

Modified: soc2013/oleksandr/ports/emulators/virtualbox-ose-additions/files/patch-src-VBox-Additions-freebsd.kmk
==============================================================================
--- soc2013/oleksandr/ports/emulators/virtualbox-ose-additions/files/patch-src-VBox-Additions-freebsd.kmk	Mon Aug 12 10:15:09 2013	(r255838)
+++ soc2013/oleksandr/ports/emulators/virtualbox-ose-additions/files/patch-src-VBox-Additions-freebsd.kmk	Mon Aug 12 11:33:32 2013	(r255839)
@@ -18,39 +18,13 @@
  #include <sys/kernel.h>
  #include <sys/sysctl.h>
  #include <sys/vnode.h>
-@@ -29,10 +29,40 @@
+@@ -29,10 +29,14 @@
  #include <sys/malloc.h>
  #include <sys/module.h>
  
 -#include <iprt/mem.h>
 +#include "vboxvfs.h"
-+#if 0
-+#include <sys/types.h>
-+#include <sys/param.h>
-+#include <sys/systm.h>
-+#include <sys/uio.h>
-+#include <sys/bio.h>
-+#include <sys/buf.h>
-+#include <sys/conf.h>
-+#include <sys/dirent.h>
-+#include <sys/fcntl.h>
-+#include <sys/iconv.h>
-+#include <sys/kernel.h>
-+#include <sys/malloc.h>
-+#include <sys/mount.h>
-+#include <sys/namei.h>
-+#include <sys/priv.h>
-+#include <sys/proc.h>
-+#include <sys/queue.h>
-+#include <sys/vnode.h>
-+#include <sys/endian.h>
  
-+#include <geom/geom.h>
-+#include <geom/geom_vfs.h>
-+
-+#include <vm/uma.h>
-+#endif
-+
  #define VFSMP2SFGLOBINFO(mp) ((struct sf_glob_info *)mp->mnt_data)
  
 +#ifdef MALLOC_DECLARE
@@ -60,7 +34,7 @@
  static int vboxvfs_version = VBOXVFS_VERSION;
  
  SYSCTL_NODE(_vfs, OID_AUTO, vboxvfs, CTLFLAG_RW, 0, "VirtualBox shared filesystem");
-@@ -51,15 +81,15 @@
+@@ -51,15 +55,15 @@
  static vfs_unmount_t    vboxvfs_unmount;
  
  static struct vfsops vboxvfs_vfsops = {
@@ -85,7 +59,7 @@
  };
  
  
-@@ -66,193 +96,238 @@
+@@ -66,193 +70,239 @@
  VFS_SET(vboxvfs_vfsops, vboxvfs, VFCF_NETWORK);
  MODULE_DEPEND(vboxvfs, vboxguest, 1, 1, 1);
  
@@ -150,6 +124,7 @@
  
 -    printf("%s: Enter\n", __FUNCTION__);
 +    	printf("%s: Enter\n", __FUNCTION__);
++	
  
 -    if (mp->mnt_flag & (MNT_UPDATE | MNT_ROOTFS))
 -        return EOPNOTSUPP;
@@ -536,10 +511,6 @@
 -    long            nextino;
 -    int             caseopt;
 -    int             didrele;
-+#define DIRENT_RECLEN(namelen)        \
-+        ((offsetof(dirent, d_name[0]) + 1 + (namelen) + 7) & ~ 7)
-+#define DIRENT_NAMELEN(reclen)        \
-+        ((reclen) - (offsetof(dirent, d_name[0])))
 +/*
 + * representation of an active mount point
 + */
@@ -645,11 +616,15 @@
 +};
 +
 +struct vboxvfs_mount_info {
-+     char 	name[MAX_HOST_NAME];
-+     char 	nls_name[MAX_NLS_NAME];
-+     int 	uid;
-+     int 	gid;
-+     int 	ttl;
++    	char name[MAX_HOST_NAME];   /* share name */
++    	char nls_name[MAX_NLS_NAME];/* name of an I/O charset */
++    	int  uid;                   /* user ID for all entries, default 0=root */
++    	int  gid;                   /* group ID for all entries, default 0=root */
++    	int  ttl;                   /* time to live */
++    	int  dmode;                 /* mode for directories if != 0xffffffff */
++    	int  fmode;                 /* mode for regular files if != 0xffffffff */
++    	int  dmask;                 /* umask applied to directories */
++    	int  fmask;                 /* umask applied to regular files */
 +};
 +
  struct sf_glob_info {
@@ -1949,7 +1924,7 @@
 ===================================================================
 --- src/VBox/Additions/freebsd/vboxvfs/vboxvfs_prov.c	(revision 0)
 +++ src/VBox/Additions/freebsd/vboxvfs/vboxvfs_prov.c	(working copy)
-@@ -0,0 +1,1009 @@
+@@ -0,0 +1,1015 @@
 +/** @file
 + * VirtualBox File System for FreeBSD Guests, provider implementation.
 + * Portions contributed by: Ronald.
@@ -1991,6 +1966,12 @@
 +#include <sys/dirent.h>
 +#include "vboxvfs.h"
 +
++#define DIRENT_RECLEN(namelen)    ((sizeof(struct dirent) -               \
++                                    sizeof(((struct dirent *)NULL)->d_name) + \
++                                    (namelen) + 1 + 7) & ~7)
++#define DIRENT_NAMELEN(reclen)        \
++        (sizeof((reclen) - (sizeof(((struct dirent *)NULL)->d_name))))
++
 +#define	SFPROV_VERSION	1
 +
 +static VBSFCLIENT vbox_client;
@@ -2825,7 +2806,7 @@
 +	int error;
 +	char *cp;
 +	int len;
-+	SHFLSTRING *mask_str = NULL;	/* must be path with "/*" appended */
++	SHFLSTRING *mask_str = NULL;	/* must be path with "/" appended */
 +	int mask_size;
 +	sfp_file_t *fp;
 +	uint32_t infobuff_alloc = 16384;
@@ -2926,7 +2907,7 @@
 +			strncpy(&dirent->sf_entry.d_name[0], info->name.String.utf8, DIRENT_NAMELEN(reclen));
 +			dirent->sf_entry.d_reclen = reclen;
 +			offset += entlen;
-+			dirent->sf_entry.d_off = offset;
++			//dirent->sf_entry.d_off = offset;
 +
 +			/* save the stats */
 +			sfprov_stat_from_info(&dirent->sf_stat, &info->Info);



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