Changeset 94f8b81c in mainline
- Timestamp:
- 2011-07-21T02:20:58Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a12f7f1
- Parents:
- 91aded7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/posix/unistd.c
r91aded7 r94f8b81c 90 90 /* Always returns false, because there is no easy way to find 91 91 * out under HelenOS. */ 92 return false;92 return 0; 93 93 } 94 94 … … 207 207 /* Check file existence by attempt to open it. */ 208 208 int fd = open(path, O_RDONLY); 209 if (fd < 0) { 210 /* FIXME: open() returns error code as negative retval. */ 211 errno = -fd; 212 fd = -1; 213 } else { 209 if (fd != -1) { 214 210 close(fd); 215 211 } … … 239 235 clk_tck = ((long) cpu_stats[0].frequency_mhz) * 1000000L; 240 236 } 241 free(cpu_stats); 242 cpu_stats = 0; 237 if (cpu_stats) { 238 free(cpu_stats); 239 cpu_stats = 0; 240 } 243 241 244 242 long phys_pages = 0; … … 248 246 phys_pages = (long) (mem_stats->total / getpagesize()); 249 247 avphys_pages = (long) (mem_stats->free / getpagesize()); 250 }251 free(mem_stats);252 mem_stats = 0;248 free(mem_stats); 249 mem_stats = 0; 250 } 253 251 254 252 switch (name) {
Note:
See TracChangeset
for help on using the changeset viewer.