Changeset 0d0b319 in mainline for uspace/lib/posix/source/stdio.c
- Timestamp:
- 2018-01-04T20:03:02Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3c7702c0
- Parents:
- 10de842
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-01-04 19:18:29)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-01-04 20:03:02)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/posix/source/stdio.c
r10de842 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 … … 344 346 const int fildes = *(int *) fd; 345 347 size_t wr; 346 int rc = vfs_write(fildes, &posix_pos[fildes], str, size, &wr); 347 if (rc != EOK) 348 return rc; 348 if (failed(vfs_write(fildes, &posix_pos[fildes], str, size, &wr))) 349 return -1; 349 350 return str_nlength(str, wr); 350 351 } … … 576 577 int posix_remove(const char *path) 577 578 { 578 if ( rcerrno(vfs_unlink_path, path) != EOK)579 if (failed(vfs_unlink_path(path))) 579 580 return -1; 580 581 else … … 591 592 int posix_rename(const char *old, const char *new) 592 593 { 593 int rc = rcerrno(vfs_rename_path, old, new); 594 if (rc != EOK) 594 if (failed(vfs_rename_path(old, new))) 595 595 return -1; 596 596 else … … 664 664 665 665 int orig_errno = errno; 666 errno = 0;666 errno = EOK; 667 667 /* Check if the file exists. */ 668 668 if (posix_access(result, F_OK) == -1) {
Note:
See TracChangeset
for help on using the changeset viewer.