VirtualBox

Ignore:
Timestamp:
Nov 22, 2018 9:16:48 PM (6 years ago)
Author:
vboxsync
Message:

darwin/VBoxSF: Started rewriting this...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/darwin/VBoxSF/VBoxSFInternal.h

    r75666 r75675  
    3939#include <sys/param.h>
    4040#include <sys/vnode.h>
     41#include <vfs/vfs_support.h>
    4142#undef PVM
    4243
     44#include <iprt/mem.h>
     45#include <VBox/VBoxGuest.h>
    4346#include <VBox/VBoxGuestLibSharedFolders.h>
    4447
     
    5962typedef struct vboxvfs_mount_data
    6063{
    61     VBGLSFMAP           pMap;               /** Shared folder mapping */
    62     SHFLSTRING         *pShareName;         /** VBoxVFS share name */
    63     uint64_t            cFileIdCounter;     /** Counter that used in order to assign unique ID to each vnode within mounted share */
    64     vnode_t             pRootVnode;         /** VFS object: vnode that corresponds shared folder root */
    65     uint8_t volatile    fRootVnodeState;    /** Sync flag that used in order to safely allocate pRootVnode */
    66     uid_t               owner;              /** User ID tha mounted shared folder */
    67     lck_grp_t          *pLockGroup;         /** BSD locking stuff */
    68     lck_grp_attr_t     *pLockGroupAttr;     /** BSD locking stuff */
    69 } vboxvfs_mount_t;
     64    /** The shared folder mapping */
     65    VBGLSFMAP           hHostFolder;
     66    /** The root VNode. */
     67    vnode_t             pVnRoot;
     68    /** User that mounted shared folder (anyone but root?). */
     69    uid_t               uidMounter;
     70    /** The mount info from the mount() call. */
     71    VBOXSFDRWNMOUNTINFO MntInfo;
     72} vboxvfs_mount_t, VBOXSFMNT;
     73typedef VBOXSFMNT *PVBOXSFMNT;
    7074
    7175/** Private data assigned to each vnode object. */
    7276typedef struct vboxvfs_vnode_data
    7377{
    74     SHFLHANDLE      pHandle;                /** VBoxVFS object handle. */
    75     PSHFLSTRING     pPath;                  /** Path within shared folder */
    76     lck_attr_t     *pLockAttr;              /** BSD locking stuff */
    77     lck_rw_t       *pLock;                  /** BSD locking stuff */
    78 } vboxvfs_vnode_t;
     78    SHFLHANDLE      hHandle;                /** VBoxVFS object handle. */
     79    ///PSHFLSTRING     pPath;                  /** Path within shared folder */
     80    ///lck_attr_t     *pLockAttr;              /** BSD locking stuff */
     81    ///lck_rw_t       *pLock;                  /** BSD locking stuff */
     82} vboxvfs_vnode_t, VBOXSFDWNVNDATA;
     83/** Private vnode data. */
     84typedef VBOXSFDWNVNDATA *PVBOXSFDWNVNDATA;
     85
    7986
    8087
     
    8289*   Global Variables                                                                                                             *
    8390*********************************************************************************************************************************/
    84 extern VBGLSFCLIENT         g_SfClient;
     91extern VBGLSFCLIENT         g_SfClientDarwin;
     92extern uint32_t volatile    g_cVBoxSfMounts;
    8593extern struct vfsops        g_VBoxSfVfsOps;
    8694extern struct vnodeopv_desc g_VBoxSfVnodeOpvDesc;
     
    9199*   Functions                                                                                                                    *
    92100*********************************************************************************************************************************/
     101bool    vboxSfDwnConnect(void);
     102vnode_t vboxSfDwnVnAlloc(mount_t pMount, enum vtype enmType, vnode_t pParent, uint64_t cbFile);
     103
     104
     105
    93106
    94107/**
     
    228241extern SHFLSTRING *vboxvfs_construct_shflstring(const char *pszName, size_t cchName);
    229242
    230 extern int vboxvfs_register_filesystem(void);
    231 extern int vboxvfs_unregister_filesystem(void);
    232 
    233243
    234244#endif
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette