Changeset 51774cd in mainline for uspace/lib/fs/libfs.c
- Timestamp:
- 2017-04-04T21:31:40Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2166728
- Parents:
- 59f388a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/fs/libfs.c
r59f388a r51774cd 231 231 } 232 232 233 static void vfs_out_get_size(ipc_callid_t rid, ipc_call_t *req)234 {235 service_id_t service_id = (service_id_t) IPC_GET_ARG1(*req);236 fs_index_t index = (fs_index_t) IPC_GET_ARG2(*req);237 int rc;238 239 fs_node_t *node = NULL;240 rc = libfs_ops->node_get(&node, service_id, index);241 if (rc != EOK)242 async_answer_0(rid, rc);243 if (node == NULL)244 async_answer_0(rid, EINVAL);245 246 uint64_t size = libfs_ops->size_get(node);247 libfs_ops->node_put(node);248 249 async_answer_2(rid, EOK, LOWER32(size), UPPER32(size));250 }251 252 233 static void vfs_out_is_empty(ipc_callid_t rid, ipc_call_t *req) 253 234 { … … 330 311 vfs_out_statfs(callid, &call); 331 312 break; 332 case VFS_OUT_GET_SIZE:333 vfs_out_get_size(callid, &call);334 break;335 313 case VFS_OUT_IS_EMPTY: 336 314 vfs_out_is_empty(callid, &call); … … 651 629 rc = ops->unlink(par, cur, component); 652 630 if (rc == EOK) { 653 int64_t size = ops->size_get(cur); 654 int32_t lsize = LOWER32(size); 655 if (lsize != size) 656 lsize = -1; 657 631 aoff64_t size = ops->size_get(cur); 658 632 async_answer_5(rid, fs_handle, service_id, 659 ops->index_get(cur), last, lsize, 660 ops->is_directory(cur)); 633 ops->index_get(cur), 634 (ops->is_directory(cur) << 16) | last, 635 LOWER32(size), UPPER32(size)); 661 636 } else { 662 637 async_answer_0(rid, rc); … … 703 678 } 704 679 705 int64_t size = ops->size_get(cur); 706 int32_t lsize = LOWER32(size); 707 if (lsize != size) 708 lsize = -1; 709 710 async_answer_5(rid, fs_handle, service_id, ops->index_get(cur), last, 711 lsize, ops->is_directory(cur)); 680 aoff64_t size = ops->size_get(cur); 681 async_answer_5(rid, fs_handle, service_id, ops->index_get(cur), 682 (ops->is_directory(cur) << 16) | last, LOWER32(size), 683 UPPER32(size)); 712 684 713 685 out:
Note:
See TracChangeset
for help on using the changeset viewer.