VirtualBox

Ignore:
Timestamp:
Nov 6, 2018 4:15:09 PM (6 years ago)
Author:
vboxsync
Message:

add/darwin/VBoxSF: More renaming, header separation and cleaning up.

File:
1 copied

Legend:

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

    r75292 r75293  
    11/* $Id$ */
    22/** @file
    3  * VBoxVFS - common header used across all the driver source files.
     3 * VBoxSF - Darwin Shared Folders, internal header.
    44 */
    55
    66/*
    7  * Copyright (C) 2013-2017 Oracle Corporation
     7 * Copyright (C) 2013-2018 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    1616 */
    1717
    18 #define MODULE_NAME "VBoxSF"
    19 
    20 #ifdef KERNEL
    21 # include <libkern/libkern.h>
    22 # include <sys/lock.h>
    23 #endif
    24 
    25 #define PINFO(fmt, args...)     printf(MODULE_NAME ": INFO: " fmt "\n", ## args)
    26 #define PDEBUG(fmt, args...)    printf(MODULE_NAME ": %s(): DEBUG: " fmt "\n", __FUNCTION__, ## args)
    27 #define PERROR(fmt, args...)    printf(MODULE_NAME ": ERROR: " fmt "\n", ## args)
    28 
    29 #define VBOXVBFS_NAME               "vboxsf"
    30 #define VBOXVFS_MOUNTINFO_MAGIC     (0xCAFE)
    31 
    32 #ifdef KERNEL
    33 
     18#ifndef ___VBoxSFInternal_h___
     19#define ___VBoxSFInternal_h___
     20
     21
     22/*********************************************************************************************************************************
     23*   Header Files                                                                                                                 *
     24*********************************************************************************************************************************/
     25#include "VBoxSFMount.h"
     26
     27#include <libkern/libkern.h>
    3428#include <iprt/types.h>
     29#include <IOKit/IOLib.h>
     30#include <IOKit/IOService.h>
     31#include <mach/mach_port.h>
     32#include <mach/kmod.h>
     33#include <mach/mach_types.h>
     34#include <sys/errno.h>
     35#include <sys/dirent.h>
     36#include <sys/lock.h>
     37#include <sys/fcntl.h>
     38#include <sys/mount.h>
     39#include <sys/param.h>
     40#include <sys/vnode.h>
    3541#undef PVM
    36 #include <sys/vnode.h>
    3742
    3843#include <VBox/VBoxGuestLibSharedFolders.h>
    3944
    4045
    41 /** Global refernce to host service connection */
    42 extern VBGLSFCLIENT g_vboxSFClient;
    43 
     46/*********************************************************************************************************************************
     47*   Defined Constants And Macros                                                                                                 *
     48*********************************************************************************************************************************/
     49/** @todo misguided, should use Log() and LogRel. sigh... */
     50#define PINFO(fmt, args...)     printf(VBOXSF_DARWIN_FS_NAME ": INFO: " fmt "\n", ## args)
     51#define PDEBUG(fmt, args...)    printf(VBOXSF_DARWIN_FS_NAME ": %s(): DEBUG: " fmt "\n", __FUNCTION__, ## args)
     52#define PERROR(fmt, args...)    printf(VBOXSF_DARWIN_FS_NAME ": ERROR: " fmt "\n", ## args)
     53
     54
     55/*********************************************************************************************************************************
     56*   Structures and Typedefs                                                                                                      *
     57*********************************************************************************************************************************/
    4458/** Private data assigned to each mounted shared folder. Assigned to mp structure. */
    4559typedef struct vboxvfs_mount_data
     
    6478} vboxvfs_vnode_t;
    6579
     80
     81/*********************************************************************************************************************************
     82*   Global Variables                                                                                                             *
     83*********************************************************************************************************************************/
     84/** Global refernce to host service connection */
     85extern VBGLSFCLIENT g_vboxSFClient;
     86
     87/* VFS options */
     88extern struct vfsops g_oVBoxVFSOpts;
     89
     90extern int (**g_VBoxVFSVnodeDirOpsVector)(void *);
     91extern int g_cVBoxVFSVnodeOpvDescListSize;
     92extern struct vnodeopv_desc *g_VBoxVFSVnodeOpvDescList[];
     93
     94
     95/*********************************************************************************************************************************
     96*   Functions                                                                                                                    *
     97*********************************************************************************************************************************/
     98
    6699/**
    67100 * Helper function to create XNU VFS vnode object.
     
    200233extern SHFLSTRING *vboxvfs_construct_shflstring(const char *pszName, size_t cchName);
    201234
    202 #endif /* KERNEL */
    203 
    204235extern int vboxvfs_register_filesystem(void);
    205236extern int vboxvfs_unregister_filesystem(void);
    206237
    207 /* VFS options */
    208 extern struct vfsops g_oVBoxVFSOpts;
    209 
    210 extern int (**g_VBoxVFSVnodeDirOpsVector)(void *);
    211 extern int g_cVBoxVFSVnodeOpvDescListSize;
    212 extern struct vnodeopv_desc *g_VBoxVFSVnodeOpvDescList[];
    213 
    214 /* Mount info */
    215 struct vboxvfs_mount_info
    216 {
    217     uint32_t    magic;
    218     char        name[MAXPATHLEN];   /* share name */
    219 };
    220 
     238
     239#endif
     240
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