VirtualBox

Changeset 31211 in vbox


Ignore:
Timestamp:
Jul 29, 2010 1:17:02 PM (14 years ago)
Author:
vboxsync
Message:

Another build fix.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxService/VBoxServiceAutoMount.cpp

    r31202 r31211  
    8181static int VBoxServiceAutoMountSharedFolder(const char *pszShareName, const char *pszMountPoint)
    8282{
     83#ifdef RT_OS_SOLARIS
     84    int flags = 0; /* No flags used yet. */
     85    int r = mount(pszShareName,
     86                  pszMountPoint,
     87                  flags,
     88                  "vboxsf",
     89                  NULL,                     /* char *dataptr */
     90                  0,                        /* int datalen */
     91                  NULL,                     /* char *optptr */
     92                  0);                       /* int optlen */
     93    if (r == 0)
     94    {
     95        VBoxServiceVerbose(0, "VBoxServiceAutoMountWorker: Shared folder \"%s\" was mounted to \"%s\"\n", pszShareName, pszMountPoint);
     96    }
     97    else
     98    {
     99        if (errno != EBUSY) /* Share is already mounted? Then skip error msg. */
     100            VBoxServiceError("VBoxServiceAutoMountWorker: Could not mount shared folder \"%s\" to \"%s\", error = %s\n",
     101                             pszShareName, pszMountPoint, strerror(errno));
     102    }
     103#else /* !RT_OS_SOLARIS */
    83104    unsigned long flags = MS_NODEV;
    84105    struct vbsf_mount_opts opts =
     
    100121    };
    101122
    102 #ifdef RT_OS_SOLARIS
    103     flags = 0; /* No flags used yet. */
    104     int r = mount(pszShareName,
    105                   pszMountPoint,
    106                   flags,
    107                   "vboxsf",
    108                   NULL,                     /* char *dataptr */
    109                   0,                        /* int datalen */
    110                   NULL,                     /* char *optptr */
    111                   0);                       /* int optlen */
    112     if (r == 0)
    113     {
    114         VBoxServiceVerbose(0, "VBoxServiceAutoMountWorker: Shared folder \"%s\" was mounted to \"%s\"\n", pszShareName, pszMountPoint);
    115     }
    116     else
    117     {
    118         if (errno != EBUSY) /* Share is already mounted? Then skip error msg. */
    119             VBoxServiceError("VBoxServiceAutoMountWorker: Could not mount shared folder \"%s\" to \"%s\", error = %s\n",
    120                              pszShareName, pszMountPoint, strerror(errno));
    121     }
    122 #else /* !RT_OS_SOLARIS */
    123123    const char *szOptions = { "rw" };
    124124    struct vbsf_mount_info_new mntinf;
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