Changeset fdbc3ff in mainline for uspace/lib/fs/libfs.c
- Timestamp:
- 2010-11-19T23:50:06Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 46d4d9f
- Parents:
- b4c9c61 (diff), a9c6b966 (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
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/fs/libfs.c
rb4c9c61 rfdbc3ff 150 150 ipc_call_t *request) 151 151 { 152 dev _handle_t mp_dev_handle = (dev_handle_t) IPC_GET_ARG1(*request);152 devmap_handle_t mp_devmap_handle = (devmap_handle_t) IPC_GET_ARG1(*request); 153 153 fs_index_t mp_fs_index = (fs_index_t) IPC_GET_ARG2(*request); 154 154 fs_handle_t mr_fs_handle = (fs_handle_t) IPC_GET_ARG3(*request); 155 dev _handle_t mr_dev_handle = (dev_handle_t) IPC_GET_ARG4(*request);155 devmap_handle_t mr_devmap_handle = (devmap_handle_t) IPC_GET_ARG4(*request); 156 156 int res; 157 157 ipcarg_t rc; … … 174 174 175 175 fs_node_t *fn; 176 res = ops->node_get(&fn, mp_dev _handle, mp_fs_index);176 res = ops->node_get(&fn, mp_devmap_handle, mp_fs_index); 177 177 if ((res != EOK) || (!fn)) { 178 178 ipc_hangup(mountee_phone); … … 201 201 ipc_call_t answer; 202 202 rc = async_data_write_forward_1_1(mountee_phone, VFS_OUT_MOUNTED, 203 mr_dev _handle, &answer);203 mr_devmap_handle, &answer); 204 204 205 205 if (rc == EOK) { 206 206 fn->mp_data.mp_active = true; 207 207 fn->mp_data.fs_handle = mr_fs_handle; 208 fn->mp_data.dev _handle = mr_dev_handle;208 fn->mp_data.devmap_handle = mr_devmap_handle; 209 209 fn->mp_data.phone = mountee_phone; 210 210 } … … 219 219 void libfs_unmount(libfs_ops_t *ops, ipc_callid_t rid, ipc_call_t *request) 220 220 { 221 dev _handle_t mp_dev_handle = (dev_handle_t) IPC_GET_ARG1(*request);221 devmap_handle_t mp_devmap_handle = (devmap_handle_t) IPC_GET_ARG1(*request); 222 222 fs_index_t mp_fs_index = (fs_index_t) IPC_GET_ARG2(*request); 223 223 fs_node_t *fn; 224 224 int res; 225 225 226 res = ops->node_get(&fn, mp_dev _handle, mp_fs_index);226 res = ops->node_get(&fn, mp_devmap_handle, mp_fs_index); 227 227 if ((res != EOK) || (!fn)) { 228 228 ipc_answer_0(rid, combine_rc(res, ENOENT)); … … 243 243 */ 244 244 res = async_req_1_0(fn->mp_data.phone, VFS_OUT_UNMOUNTED, 245 fn->mp_data.dev _handle);245 fn->mp_data.devmap_handle); 246 246 247 247 /* … … 252 252 fn->mp_data.mp_active = false; 253 253 fn->mp_data.fs_handle = 0; 254 fn->mp_data.dev _handle = 0;254 fn->mp_data.devmap_handle = 0; 255 255 fn->mp_data.phone = 0; 256 256 /* Drop the reference created in libfs_mount(). */ … … 281 281 unsigned int last = IPC_GET_ARG2(*request); 282 282 unsigned int next = first; 283 dev _handle_t dev_handle = IPC_GET_ARG3(*request);283 devmap_handle_t devmap_handle = IPC_GET_ARG3(*request); 284 284 int lflag = IPC_GET_ARG4(*request); 285 285 fs_index_t index = IPC_GET_ARG5(*request); … … 295 295 fs_node_t *tmp = NULL; 296 296 297 rc = ops->root_get(&cur, dev _handle);297 rc = ops->root_get(&cur, devmap_handle); 298 298 on_error(rc, goto out_with_answer); 299 299 300 300 if (cur->mp_data.mp_active) { 301 301 ipc_forward_slow(rid, cur->mp_data.phone, VFS_OUT_LOOKUP, 302 next, last, cur->mp_data.dev _handle, lflag, index,302 next, last, cur->mp_data.devmap_handle, lflag, index, 303 303 IPC_FF_ROUTE_FROM_ME); 304 304 (void) ops->node_put(cur); … … 358 358 359 359 ipc_forward_slow(rid, tmp->mp_data.phone, 360 VFS_OUT_LOOKUP, next, last, tmp->mp_data.dev _handle,360 VFS_OUT_LOOKUP, next, last, tmp->mp_data.devmap_handle, 361 361 lflag, index, IPC_FF_ROUTE_FROM_ME); 362 362 (void) ops->node_put(cur); … … 385 385 fs_node_t *fn; 386 386 if (lflag & L_CREATE) 387 rc = ops->create(&fn, dev _handle,387 rc = ops->create(&fn, devmap_handle, 388 388 lflag); 389 389 else 390 rc = ops->node_get(&fn, dev _handle,390 rc = ops->node_get(&fn, devmap_handle, 391 391 index); 392 392 on_error(rc, goto out_with_answer); … … 401 401 aoff64_t size = ops->size_get(fn); 402 402 ipc_answer_5(rid, fs_handle, 403 dev _handle,403 devmap_handle, 404 404 ops->index_get(fn), 405 405 LOWER32(size), … … 469 469 fs_node_t *fn; 470 470 if (lflag & L_CREATE) 471 rc = ops->create(&fn, dev _handle, lflag);471 rc = ops->create(&fn, devmap_handle, lflag); 472 472 else 473 rc = ops->node_get(&fn, dev _handle, index);473 rc = ops->node_get(&fn, devmap_handle, index); 474 474 on_error(rc, goto out_with_answer); 475 475 … … 483 483 aoff64_t size = ops->size_get(fn); 484 484 ipc_answer_5(rid, fs_handle, 485 dev _handle,485 devmap_handle, 486 486 ops->index_get(fn), 487 487 LOWER32(size), … … 509 509 if (rc == EOK) { 510 510 aoff64_t size = ops->size_get(cur); 511 ipc_answer_5(rid, fs_handle, dev _handle,511 ipc_answer_5(rid, fs_handle, devmap_handle, 512 512 ops->index_get(cur), LOWER32(size), UPPER32(size), 513 513 old_lnkcnt); … … 547 547 if (rc == EOK) { 548 548 aoff64_t size = ops->size_get(cur); 549 ipc_answer_5(rid, fs_handle, dev _handle,549 ipc_answer_5(rid, fs_handle, devmap_handle, 550 550 ops->index_get(cur), LOWER32(size), UPPER32(size), 551 551 ops->lnkcnt_get(cur)); … … 571 571 ipc_call_t *request) 572 572 { 573 dev _handle_t dev_handle = (dev_handle_t) IPC_GET_ARG1(*request);573 devmap_handle_t devmap_handle = (devmap_handle_t) IPC_GET_ARG1(*request); 574 574 fs_index_t index = (fs_index_t) IPC_GET_ARG2(*request); 575 575 576 576 fs_node_t *fn; 577 int rc = ops->node_get(&fn, dev _handle, index);577 int rc = ops->node_get(&fn, devmap_handle, index); 578 578 on_error(rc, answer_and_return(rid, rc)); 579 579 … … 592 592 593 593 stat.fs_handle = fs_handle; 594 stat.dev _handle = dev_handle;594 stat.devmap_handle = devmap_handle; 595 595 stat.index = index; 596 596 stat.lnkcnt = ops->lnkcnt_get(fn); … … 617 617 ipc_call_t *request) 618 618 { 619 dev _handle_t dev_handle = IPC_GET_ARG1(*request);619 devmap_handle_t devmap_handle = IPC_GET_ARG1(*request); 620 620 fs_index_t index = IPC_GET_ARG2(*request); 621 621 622 622 fs_node_t *fn; 623 int rc = ops->node_get(&fn, dev _handle, index);623 int rc = ops->node_get(&fn, devmap_handle, index); 624 624 on_error(rc, answer_and_return(rid, rc)); 625 625
Note:
See TracChangeset
for help on using the changeset viewer.