Changeset ec18957a in mainline for uspace/lib/posix/sys/stat.c
- Timestamp:
- 2011-07-08T00:54:24Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9c1984f
- Parents:
- 3f466c33
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/posix/sys/stat.c
r3f466c33 rec18957a 39 39 #include "stat.h" 40 40 41 #include "../errno.h" 41 42 #include "../libc/mem.h" 42 43 … … 76 77 { 77 78 struct stat hst; 78 if (fstat(fd, &hst) == -1) { 79 // TODO: propagate a POSIX compatible errno 79 int rc = fstat(fd, &hst); 80 if (rc < 0) { 81 /* fstat() returns negative error code instead of using errno. 82 */ 83 errno = -rc; 80 84 return -1; 81 85 } … … 107 111 { 108 112 struct stat hst; 109 if (stat(path, &hst) == -1) { 110 // TODO: propagate a POSIX compatible errno 113 int rc = stat(path, &hst); 114 if (rc < 0) { 115 /* stat() returns negative error code instead of using errno. 116 */ 117 errno = -rc; 111 118 return -1; 112 119 }
Note:
See TracChangeset
for help on using the changeset viewer.