Changeset ff381a7 in mainline for uspace/lib/posix/source/sys/stat.c


Ignore:
Timestamp:
2015-11-02T20:54:19Z (9 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d8513177
Parents:
3feeab2 (diff), 5265eea4 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/posix/source/sys/stat.c

    r3feeab2 rff381a7  
    8080{
    8181        struct stat hst;
    82         int rc = fstat(fd, &hst);
    83         if (rc < 0) {
    84                 /* fstat() returns negative error code instead of using errno. */
    85                 errno = -rc;
    86                 return -1;
    87         }
     82        int rc = negerrno(fstat, fd, &hst);
     83        if (rc < 0)
     84                return rc;
    8885        stat_to_posix(st, &hst);
    8986        return 0;
     
    113110{
    114111        struct stat hst;
    115         int rc = stat(path, &hst);
    116         if (rc < 0) {
    117                 /* stat() returns negative error code instead of using errno. */
    118                 errno = -rc;
    119                 return -1;
    120         }
     112        int rc = negerrno(stat, path, &hst);
     113        if (rc < 0)
     114                return rc;
    121115        stat_to_posix(st, &hst);
    122116        return 0;
Note: See TracChangeset for help on using the changeset viewer.