Changeset 132ab5d1 in mainline for uspace/lib/posix/source/stdio.c
- Timestamp:
- 2018-01-30T03:20:45Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/fix-logger-deadlock, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5a6cc679
- Parents:
- 8bfb163 (diff), 6a5d05b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - File:
-
- 1 edited
-
uspace/lib/posix/source/stdio.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/posix/source/stdio.c
r8bfb163 r132ab5d1 41 41 42 42 #include "posix/assert.h" 43 #include "posix/errno.h" 43 44 #include <errno.h> 45 44 46 #include "posix/stdlib.h" 45 47 #include "posix/string.h" … … 313 315 int posix_fflush(FILE *stream) 314 316 { 315 return negerrno(fflush,stream);317 return fflush(stream); 316 318 } 317 319 … … 343 345 { 344 346 const int fildes = *(int *) fd; 345 s size_t wr = vfs_write(fildes, &posix_pos[fildes], str, size);346 if ( wr < 0)347 return wr;347 size_t wr; 348 if (failed(vfs_write(fildes, &posix_pos[fildes], str, size, &wr))) 349 return -1; 348 350 return str_nlength(str, wr); 349 351 } … … 371 373 372 374 const int fildes = *(int *) fd; 373 if (vfs_write(fildes, &posix_pos[fildes], buf, sz) < 0) 375 size_t nwr; 376 if (vfs_write(fildes, &posix_pos[fildes], buf, sz, &nwr) != EOK) 374 377 break; 375 378 … … 574 577 int posix_remove(const char *path) 575 578 { 576 if ( rcerrno(vfs_unlink_path, path) != EOK)579 if (failed(vfs_unlink_path(path))) 577 580 return -1; 578 581 else … … 589 592 int posix_rename(const char *old, const char *new) 590 593 { 591 int rc = rcerrno(vfs_rename_path, old, new); 592 if (rc != EOK) 594 if (failed(vfs_rename_path(old, new))) 593 595 return -1; 594 596 else … … 662 664 663 665 int orig_errno = errno; 664 errno = 0;666 errno = EOK; 665 667 /* Check if the file exists. */ 666 668 if (posix_access(result, F_OK) == -1) {
Note:
See TracChangeset
for help on using the changeset viewer.
