Ignore:
File:
1 edited

Legend:

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

    r6afc9d7 rfdf97f6  
    8080{
    8181        struct stat hst;
    82         int rc = negerrno(fstat, fd, &hst);
    83         if (rc < 0)
    84                 return rc;
     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        }
    8588        stat_to_posix(st, &hst);
    8689        return 0;
     
    110113{
    111114        struct stat hst;
    112         int rc = negerrno(stat, path, &hst);
    113         if (rc < 0)
    114                 return rc;
     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        }
    115121        stat_to_posix(st, &hst);
    116122        return 0;
Note: See TracChangeset for help on using the changeset viewer.