- Timestamp:
- Mar 22, 2012, 2:01:57 PM (13 years ago)
- Location:
- trunk/libc/src/kNIX/os2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libc/src/kNIX/os2/b_fsNativeFileModeSet.c
r2929 r3777 144 144 mode_t CurMode; 145 145 rc = __libc_back_fsUnixAttribsGetMode(-1, pszNativePath, &CurMode); 146 if (__predict_true(!rc ))146 if (__predict_true(!rc || rc == -ENOTSUP)) 147 147 { 148 148 /* correct the passed in Mode mask. */ 149 149 Mode &= ALLPERMS; /** @todo sticky bit and set uid/gid access validation... */ 150 Mode |= CurMode & ~ALLPERMS; 150 if (!(CurMode & ~ALLPERMS)) 151 { 152 #if OFF_MAX > LONG_MAX 153 if ((fLarge ? info.fsts4L.attrFile : info.fsts4.attrFile) & FILE_DIRECTORY) 154 #else 155 if (info.fsts4.attrFile & FILE_DIRECTORY) 156 #endif 157 Mode |= S_IFDIR; 158 else 159 Mode |= S_IFREG; 160 } 161 else 162 Mode |= CurMode & ~ALLPERMS; 151 163 152 164 /* construct FEA2 stuff. */ … … 184 196 } 185 197 } 186 else if (rc == -ENOTSUP)187 rc = 0;188 189 198 if (__predict_false(rc != 0)) 190 199 { -
trunk/libc/src/kNIX/os2/fhOS2File.c
r3776 r3777 608 608 mode_t fCurMode; 609 609 rc = __libc_back_fsUnixAttribsGetMode(pFH->fh, pFH->pszNativePath, &fCurMode); 610 if (__predict_true(!rc ))610 if (__predict_true(!rc || rc == -ENOTSUP)) 611 611 { 612 612 /* correct the passed in Mode mask. */ 613 613 fMode &= ALLPERMS; /** @todo sticky bit and set uid/gid access validation... */ 614 fMode |= fCurMode & ~ALLPERMS; 614 if (!(fCurMode & ~ALLPERMS)) 615 fMode |= S_IFREG; 616 else 617 fMode |= fCurMode & ~ALLPERMS; 615 618 616 619 /* construct FEA2 stuff. */ … … 653 656 } 654 657 } 655 else if (rc == -ENOTSUP)656 rc = 0;657 658 } 658 659 if (!rc)
Note:
See TracChangeset
for help on using the changeset viewer.