Changeset 955c2b0 in mainline for uspace/lib/posix/unistd.c


Ignore:
Timestamp:
2011-07-28T22:34:38Z (13 years ago)
Author:
Petr Koupy <petr.koupy@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9350bfdd
Parents:
75406dc
Message:

Bugfixes in getcwd() and access().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/posix/unistd.c

    r75406dc r955c2b0  
    111111        }
    112112        char *ret = getcwd(buf, size);
    113         if (ret == NULL) {
     113        /* Check errno to avoid shadowing possible ENOMEM. */
     114        if (ret == NULL && errno == EOK) {
    114115                errno = ERANGE;
    115116        }
     
    271272                if (fd < 0) {
    272273                        errno = -fd;
    273                         return 0;
     274                        return -1;
    274275                }
    275276                close(fd);
    276                 return 1;
     277                return 0;
    277278        } else {
    278279                /* Invalid amode argument. */
Note: See TracChangeset for help on using the changeset viewer.