socsvn commit: r255839 - soc2013/oleksandr/ports/emulators/virtualbox-ose-additions/files

From: <oleksandr_at_FreeBSD.org>
Date: Mon, 12 Aug 2013 11:33:32 GMT
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)
_at__at_ -18,39 +18,13 _at__at_
  #include <sys/kernel.h>
  #include <sys/sysctl.h>
  #include <sys/vnode.h>
-_at__at_ -29,10 +29,40 _at__at_
+_at__at_ -29,10 +29,14 _at__at_
  #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
_at__at_ -60,7 +34,7 _at__at_
  static int vboxvfs_version = VBOXVFS_VERSION;
  
  SYSCTL_NODE(_vfs, OID_AUTO, vboxvfs, CTLFLAG_RW, 0, "VirtualBox shared filesystem");
-_at__at_ -51,15 +81,15 _at__at_
+_at__at_ -51,15 +55,15 _at__at_
  static vfs_unmount_t    vboxvfs_unmount;
  
  static struct vfsops vboxvfs_vfsops = {
_at__at_ -85,7 +59,7 _at__at_
  };
  
  
-_at__at_ -66,193 +96,238 _at__at_
+_at__at_ -66,193 +70,239 _at__at_
  VFS_SET(vboxvfs_vfsops, vboxvfs, VFCF_NETWORK);
  MODULE_DEPEND(vboxvfs, vboxguest, 1, 1, 1);
  
_at__at_ -150,6 +124,7 _at__at_
  
 -    printf("%s: Enter\n", __FUNCTION__);
 +    	printf("%s: Enter\n", __FUNCTION__);
++	
  
 -    if (mp->mnt_flag & (MNT_UPDATE | MNT_ROOTFS))
 -        return EOPNOTSUPP;
_at__at_ -536,10 +511,6 _at__at_
 -    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
 + */
_at__at_ -645,11 +616,15 _at__at_
 +};
 +
 +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 {
_at__at_ -1949,7 +1924,7 _at__at_
 ===================================================================
 --- src/VBox/Additions/freebsd/vboxvfs/vboxvfs_prov.c	(revision 0)
 +++ src/VBox/Additions/freebsd/vboxvfs/vboxvfs_prov.c	(working copy)
-_at__at_ -0,0 +1,1009 _at__at_
+_at__at_ -0,0 +1,1015 _at__at_
 +/** _at_file
 + * VirtualBox File System for FreeBSD Guests, provider implementation.
 + * Portions contributed by: Ronald.
_at__at_ -1991,6 +1966,12 _at__at_
 +#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;
_at__at_ -2825,7 +2806,7 _at__at_
 +	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;
_at__at_ -2926,7 +2907,7 _at__at_
 +			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);
Received on Mon Aug 12 2013 - 11:33:32 UTC