VirtualBox

Changeset 39627 in vbox for trunk/src/VBox/Runtime/r3/posix


Ignore:
Timestamp:
Dec 15, 2011 11:44:19 AM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
75421
Message:

backed out previous changeset

Location:
trunk/src/VBox/Runtime/r3/posix
Files:
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/posix/dir-posix.cpp

    r39626 r39627  
    194194
    195195
    196 int rtDirNativeOpen(PRTDIR pDir, char *pszPathBuf, uint32_t fOpen)
     196int rtDirNativeOpen(PRTDIR pDir, char *pszPathBuf)
    197197{
    198198    NOREF(pszPathBuf); /* only used on windows */
     
    205205    if (RT_SUCCESS(rc))
    206206    {
    207 #if defined(RT_OS_LINUX) || defined(RT_OS_SOLARIS) || defined(RT_OS_FREEBSD)
    208         /* XXX Darwin? */
    209         if (fOpen & RTDIROPEN_FLAGS_NO_SYMLINKS)
    210         {
    211             const char *pszName;
    212             int fhDir;
    213             rc = rtPathOpenPathNoFollowFh(pszNativePath, &fhDir, &pszName);
    214             printf("rtPathOpenPathNoFollowFh '%s' => %d\n", pszNativePath, rc);
    215             AssertRCReturn(rc, rc);
    216             if (pszName != NULL)
    217             {
    218                 AssertMsgFailed(("Path name '%s' contains filename\n", pszNativePath));
    219                 return VERR_INVALID_PARAMETER;
    220             }
    221             pDir->pDir = fdopendir(fhDir);
    222             /*
    223              * do NOT close fhDir, it will be closed implicitely when closing pDir!
    224              */
    225         }
    226         else
    227 #endif
    228         {
    229             pDir->pDir = opendir(pszNativePath);
    230         }
     207        pDir->pDir = opendir(pszNativePath);
    231208        if (pDir->pDir)
    232209        {
  • trunk/src/VBox/Runtime/r3/posix/fileio-posix.cpp

    r39626 r39627  
    204204        return (rc);
    205205
    206     int fh;
    207 #if defined(RT_OS_LINUX) || defined(RT_OS_SOLARIS) || defined(RT_OS_FREEBSD)
    208     /* XXX Darwin? */
    209     if (fOpen & RTFILE_O_NO_SYMLINKS)
    210     {
    211         const char *pszName;
    212         int fhDir;
    213         rc = rtPathOpenPathNoFollowFh(pszNativeFilename, &fhDir, &pszName);
    214         if (RT_FAILURE(rc))
    215         {
    216             rtPathFreeNative(pszNativeFilename, pszFilename);
    217             return rc;
    218         }
    219         fh = openat(fhDir, pszName, fOpenMode, fMode | O_NOFOLLOW);
    220         close(fhDir);
    221     }
    222     else
    223 #endif
    224     {
    225         fh = open(pszNativeFilename, fOpenMode, fMode);
    226     }
     206    int fh = open(pszNativeFilename, fOpenMode, fMode);
    227207    int iErr = errno;
    228208
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