Changeset 2810


Ignore:
Timestamp:
Sep 9, 2006, 4:15:12 AM (19 years ago)
Author:
bird
Message:

Fixed file creation when opening with read-only acess. Fixes #122.

Files:
2 added
8 edited

Legend:

Unmodified
Added
Removed
  • branches/libc-0.6/src/emx/ChangeLog.LIBC

    r2798 r2810  
    22
    33TODO: open replace on RAMFS fails with error 32!
     4
     52006-09-08: knut st. osmundsen <bird-gccos2-spam@anduin.net>
     6    - libc:
     7        o #122: Fixed file creation when opening with read-only access.
    48
    592006-08-27: knut st. osmundsen <bird-gccos2-spam@anduin.net>
  • branches/libc-0.6/src/emx/src/lib/io/_vsopen.c

    r2316 r2810  
    3939     * Validate input
    4040     */
    41     if (    (fOpen & O_ACCMODE) == O_RDONLY
    42         &&  (fOpen & (O_TRUNC | O_CREAT)))
     41    if ((fOpen & O_ACCMODE) == O_ACCMODE)
    4342    {
    4443        errno = EINVAL;
     
    155154
    156155    /*
    157      * Reopen the file in write-only Mode if Ctrl-Z hack applied.
     156     * Reopen the file in write-only mode if Ctrl-Z hack applied.
    158157     */
    159158    if (fCtrlZKludge)
  • branches/libc-0.6/src/emx/src/lib/sys/b_ioFileOpen.c

    r2522 r2810  
    7474     * Validate input.
    7575     */
    76     if (    (fLibc & O_ACCMODE) == O_RDONLY
    77         &&  (fLibc & (O_TRUNC | O_CREAT)))
     76    if ((fOpen & O_ACCMODE) == O_ACCMODE)
    7877        LIBCLOG_ERROR_RETURN_INT(-EINVAL);
    7978
  • branches/libc-0.6/src/libctests/libc/Makefile

    r2809 r2810  
    145145IO := \
    146146        io/open-1.c \
     147        io/open-2.c \
    147148        io/sprintf-1.c \
    148149        io/sscanf-1.c
  • trunk/libc/ChangeLog.LIBC

    r2799 r2810  
    22
    33TODO: open replace on RAMFS fails with error 32!
     4
     52006-09-08: knut st. osmundsen <bird-gccos2-spam@anduin.net>
     6    - libc:
     7        o #122: Fixed file creation when opening with read-only access.
    48
    592006-08-27: knut st. osmundsen <bird-gccos2-spam@anduin.net>
  • trunk/libc/src/kNIX/os2/b_ioFileOpen.c

    r2739 r2810  
    7474     * Validate input.
    7575     */
    76     if (    (fLibc & O_ACCMODE) == O_RDONLY
    77         &&  (fLibc & (O_TRUNC | O_CREAT)))
     76    if ((fOpen & O_ACCMODE) == O_ACCMODE)
    7877        LIBCLOG_ERROR_RETURN_INT(-EINVAL);
    7978
  • trunk/libc/src/libc/io/_vsopen.c

    r2739 r2810  
    3939     * Validate input
    4040     */
    41     if (    (fOpen & O_ACCMODE) == O_RDONLY
    42         &&  (fOpen & (O_TRUNC | O_CREAT)))
     41    if ((fOpen & O_ACCMODE) == O_ACCMODE)
    4342    {
    4443        errno = EINVAL;
  • trunk/libc/tests/libc/Makefile

    r2809 r2810  
    145145IO := \
    146146        io/open-1.c \
     147        io/open-2.c \
    147148        io/sprintf-1.c \
    148149        io/sscanf-1.c
Note: See TracChangeset for help on using the changeset viewer.