Changes in uspace/lib/posix/source/sys/stat.c [6afc9d7:fdf97f6] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/posix/source/sys/stat.c
r6afc9d7 rfdf97f6 80 80 { 81 81 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 } 85 88 stat_to_posix(st, &hst); 86 89 return 0; … … 110 113 { 111 114 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 } 115 121 stat_to_posix(st, &hst); 116 122 return 0;
Note:
See TracChangeset
for help on using the changeset viewer.