Changeset 67e881c in mainline for uspace/lib/c/generic/vfs/vfs.c
- Timestamp:
- 2017-03-30T20:59:36Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a56cef9
- Parents:
- 79ea5af
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/vfs/vfs.c
r79ea5af r67e881c 408 408 assert(!(oflag & O_APPEND)); 409 409 410 (void) ftruncate(fd, 0);410 (void) vfs_resize(fd, 0); 411 411 } 412 412 … … 620 620 * @param length Length 621 621 * 622 * @return 0 on success , -1 on error and sets errno.623 */ 624 int ftruncate(int fildes, aoff64_t length)622 * @return 0 on success or a negative erroc code otherwise. 623 */ 624 int vfs_resize(int file, aoff64_t length) 625 625 { 626 626 sysarg_t rc; 627 627 628 628 async_exch_t *exch = vfs_exchange_begin(); 629 rc = async_req_3_0(exch, VFS_IN_TRUNCATE, fildes, 630 LOWER32(length), UPPER32(length)); 631 vfs_exchange_end(exch); 632 633 if (rc != EOK) { 634 errno = rc; 635 return -1; 636 } 637 638 return 0; 629 rc = async_req_3_0(exch, VFS_IN_RESIZE, file, LOWER32(length), 630 UPPER32(length)); 631 vfs_exchange_end(exch); 632 633 return rc; 639 634 } 640 635
Note:
See TracChangeset
for help on using the changeset viewer.