VirtualBox

Changeset 33856 in vbox


Ignore:
Timestamp:
Nov 8, 2010 3:47:58 PM (14 years ago)
Author:
vboxsync
Message:

VBoxService/AutoMount: Added bits for Solaris mounting.

File:
1 edited

Legend:

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

    r33847 r33856  
    106106     * procfs contains the full path but not the actual share name ...
    107107     * FILE *pFh = setmntent("/proc/mounts", "r+t"); */
     108#ifdef RT_OS_SOLARIS
     109    FILE *pFh = fopen(_PATH_MOUNTED, "r");
     110    if (!pFh)
     111        VBoxServiceError("VBoxServiceAutoMountShareIsMounted: Could not open mtab!\n");
     112    else
     113    {
     114        mnttab mntTab;
     115        while ((getmntent(&pFh, &mntTab)))
     116        {
     117            if (!RTStrICmp(mntTab->mnt_special, pszShare))
     118            {
     119                fMounted = RTStrPrintf(pszMountPoint, cbMountPoint, "%s", pMntEnt->mnt_mountp)
     120                         ? true : false;
     121                break;
     122            }
     123        }
     124        fclose(pFh);
     125    }
     126#else
    108127    FILE *pFh = setmntent(_PATH_MOUNTED, "r+t");
    109128    if (pFh == NULL)
     
    123142        endmntent(pFh);
    124143    }
     144#endif
    125145    return fMounted;
    126146}
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