Skip to content

Commit 81b25fc

Browse files
authored
Merge pull request #799 from uyjulian/iomanx_fix_mode_type_conv
Apply type components by element instead of macro in iomanX
2 parents 185cd58 + 1cc117f commit 81b25fc

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

iop/system/iomanx/src/iomanX.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -326,11 +326,11 @@ int mode2modex(int mode)
326326
{
327327
int modex = 0;
328328

329-
if ( FIO_SO_ISLNK(mode) )
329+
if ( (mode & FIO_SO_IFLNK) != 0 )
330330
modex |= FIO_S_IFLNK;
331-
if ( FIO_SO_ISREG(mode) )
331+
if ( (mode & FIO_SO_IFREG) != 0 )
332332
modex |= FIO_S_IFREG;
333-
if ( FIO_SO_ISDIR(mode) )
333+
if ( (mode & FIO_SO_IFDIR) != 0 )
334334
modex |= FIO_S_IFDIR;
335335

336336
/* Convert the file access modes. */
@@ -348,11 +348,11 @@ int modex2mode(int modex)
348348
{
349349
int mode = 0;
350350

351-
if ( FIO_S_ISLNK(modex) )
351+
if ( (modex & FIO_S_IFLNK) != 0 )
352352
mode |= FIO_SO_IFLNK;
353-
if ( FIO_S_ISREG(modex) )
353+
if ( (modex & FIO_S_IFREG) != 0 )
354354
mode |= FIO_SO_IFREG;
355-
if ( FIO_S_ISDIR(modex) )
355+
if ( (modex & FIO_S_IFDIR) != 0 )
356356
mode |= FIO_SO_IFDIR;
357357

358358
/* Convert the file access modes. */

0 commit comments

Comments
 (0)