Ignore:
Timestamp:
Aug 28, 2006, 2:36:40 AM (19 years ago)
Author:
bird
Message:

Corrected DosSetFHState mask. Fixes #118.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libc/src/kNIX/filehandles.c

    r2739 r2794  
    13911391        if (fulNewState != fulState)
    13921392        {
    1393             fulNewState &= 0x7f88; /* Mask the flags accepted the API. */
     1393            fulNewState &= OPEN_FLAGS_WRITE_THROUGH | OPEN_FLAGS_FAIL_ON_ERROR | OPEN_FLAGS_NO_CACHE | OPEN_FLAGS_NOINHERIT; /* Turn off non-participating bits. */
    13941394            rc = DosSetFHState(fh, fulNewState);
    13951395        }
     
    15021502                                {
    15031503                                    fulState = fulState & ~OPEN_FLAGS_NOINHERIT;
    1504                                     fulState &= 0x7f88; /* Mask the flags accepted by the API. */
     1504                                    fulState &= OPEN_FLAGS_WRITE_THROUGH | OPEN_FLAGS_FAIL_ON_ERROR | OPEN_FLAGS_NO_CACHE | OPEN_FLAGS_NOINHERIT; /* Turn off non-participating bits. */
    15051505                                    rc = DosSetFHState(iFH, fulState);
    15061506                                }
     
    16241624                        {
    16251625                            fulState |= OPEN_FLAGS_NOINHERIT;
    1626                             fulState &= 0x7f88; /* Mask the flags accepted by the API. */
     1626                            fulState &= OPEN_FLAGS_WRITE_THROUGH | OPEN_FLAGS_FAIL_ON_ERROR | OPEN_FLAGS_NO_CACHE | OPEN_FLAGS_NOINHERIT; /* Turn off non-participating bits. */
    16271627                            rc = DosSetFHState(iFH, fulState);
    16281628                        }
     
    16931693                    {
    16941694                        fulState |= OPEN_FLAGS_NOINHERIT;
    1695                         fulState &= 0x7f88; /* Mask the flags accepted by the API. */
     1695                        fulState &= OPEN_FLAGS_WRITE_THROUGH | OPEN_FLAGS_FAIL_ON_ERROR | OPEN_FLAGS_NO_CACHE | OPEN_FLAGS_NOINHERIT; /* Turn off non-participating bits. */
    16961696                        rc = DosSetFHState(iFH, fulState);
    16971697                    }
Note: See TracChangeset for help on using the changeset viewer.