From owner-svn-soc-all@FreeBSD.ORG Mon Aug 12 11:33:32 2013 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id DD666A7C for ; Mon, 12 Aug 2013 11:33:32 +0000 (UTC) (envelope-from oleksandr@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BB70B24EF for ; Mon, 12 Aug 2013 11:33:32 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7CBXW17088458 for ; Mon, 12 Aug 2013 11:33:32 GMT (envelope-from oleksandr@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.7/8.14.6/Submit) id r7CBXW74088452 for svn-soc-all@FreeBSD.org; Mon, 12 Aug 2013 11:33:32 GMT (envelope-from oleksandr@FreeBSD.org) Date: Mon, 12 Aug 2013 11:33:32 GMT Message-Id: <201308121133.r7CBXW74088452@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to oleksandr@FreeBSD.org using -f From: oleksandr@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r255839 - soc2013/oleksandr/ports/emulators/virtualbox-ose-additions/files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Aug 2013 11:33:32 -0000 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 #include #include -@@ -29,10 +29,40 @@ +@@ -29,10 +29,14 @@ #include #include -#include +#include "vboxvfs.h" -+#if 0 -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#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 +#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);