Changes in uspace/lib/posix/source/stdio.c [0d0b319:78188e5] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/posix/source/stdio.c
r0d0b319 r78188e5 41 41 42 42 #include "posix/assert.h" 43 44 #include <errno.h> 45 43 #include "posix/errno.h" 46 44 #include "posix/stdlib.h" 47 45 #include "posix/string.h" … … 315 313 int posix_fflush(FILE *stream) 316 314 { 317 return fflush(stream);315 return negerrno(fflush, stream); 318 316 } 319 317 … … 345 343 { 346 344 const int fildes = *(int *) fd; 347 s ize_t wr;348 if ( failed(vfs_write(fildes, &posix_pos[fildes], str, size, &wr)))349 return -1;345 ssize_t wr = vfs_write(fildes, &posix_pos[fildes], str, size); 346 if (wr < 0) 347 return wr; 350 348 return str_nlength(str, wr); 351 349 } … … 373 371 374 372 const int fildes = *(int *) fd; 375 size_t nwr; 376 if (vfs_write(fildes, &posix_pos[fildes], buf, sz, &nwr) != EOK) 373 if (vfs_write(fildes, &posix_pos[fildes], buf, sz) < 0) 377 374 break; 378 375 … … 577 574 int posix_remove(const char *path) 578 575 { 579 if ( failed(vfs_unlink_path(path)))576 if (rcerrno(vfs_unlink_path, path) != EOK) 580 577 return -1; 581 578 else … … 592 589 int posix_rename(const char *old, const char *new) 593 590 { 594 if (failed(vfs_rename_path(old, new))) 591 int rc = rcerrno(vfs_rename_path, old, new); 592 if (rc != EOK) 595 593 return -1; 596 594 else … … 664 662 665 663 int orig_errno = errno; 666 errno = EOK;664 errno = 0; 667 665 /* Check if the file exists. */ 668 666 if (posix_access(result, F_OK) == -1) {
Note:
See TracChangeset
for help on using the changeset viewer.