Changes in uspace/lib/posix/source/stdio.c [78188e5:0d0b319] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/posix/source/stdio.c
r78188e5 r0d0b319 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.