Rev 3103 | Rev 3352 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3103 | Rev 3109 | ||
---|---|---|---|
Line 391... | Line 391... | ||
391 | free(dentry->data); |
391 | free(dentry->data); |
392 | free(dentry); |
392 | free(dentry); |
393 | return EOK; |
393 | return EOK; |
394 | } |
394 | } |
395 | 395 | ||
396 | void tmpfs_mount(ipc_callid_t rid, ipc_call_t *request) |
396 | void tmpfs_mounted(ipc_callid_t rid, ipc_call_t *request) |
397 | { |
397 | { |
398 | dev_handle_t mr_dev_handle = (dev_handle_t) IPC_GET_ARG1(*request); |
398 | dev_handle_t dev_handle = (dev_handle_t) IPC_GET_ARG1(*request); |
399 | fs_index_t mr_index = (fs_index_t) IPC_GET_ARG2(*request); |
- | |
400 | fs_handle_t mp_fs_handle = (fs_handle_t) IPC_GET_ARG3(*request); |
- | |
401 | dev_handle_t mp_dev_handle = (dev_handle_t) IPC_GET_ARG4(*request); |
- | |
402 | fs_index_t mp_index = (fs_index_t) IPC_GET_ARG5(*request); |
- | |
403 | - | ||
404 | if ((mr_index == root->index) && |
- | |
405 | (mp_fs_handle == tmpfs_reg.fs_handle) && |
- | |
406 | (mp_index == mr_index)) { |
- | |
407 | - | ||
408 | if (mr_dev_handle >= 0) { |
- | |
409 | if (tmpfs_restore(mr_dev_handle)) |
- | |
410 | ipc_answer_0(rid, EOK); |
- | |
411 | else |
- | |
412 | ipc_answer_0(rid, ELIMIT); |
- | |
413 | } else |
- | |
414 | ipc_answer_0(rid, EOK); |
- | |
415 | } else |
- | |
416 | ipc_answer_0(rid, ENOTSUP); |
- | |
417 | } |
- | |
418 | 399 | ||
419 | void tmpfs_lookup(ipc_callid_t rid, ipc_call_t *request) |
- | |
420 | { |
- | |
421 | /* Initialize TMPFS. */ |
400 | /* Initialize TMPFS. */ |
422 | if (!root && !tmpfs_init()) { |
401 | if (!root && !tmpfs_init()) { |
423 | ipc_answer_0(rid, ENOMEM); |
402 | ipc_answer_0(rid, ENOMEM); |
424 | return; |
403 | return; |
425 | } |
404 | } |
- | 405 | ||
- | 406 | if (dev_handle >= 0) { |
|
- | 407 | if (tmpfs_restore(dev_handle)) |
|
- | 408 | ipc_answer_0(rid, EOK); |
|
- | 409 | else |
|
- | 410 | ipc_answer_0(rid, ELIMIT); |
|
- | 411 | } else { |
|
- | 412 | ipc_answer_0(rid, EOK); |
|
- | 413 | } |
|
- | 414 | } |
|
- | 415 | ||
- | 416 | void tmpfs_mount(ipc_callid_t rid, ipc_call_t *request) |
|
- | 417 | { |
|
- | 418 | dev_handle_t mp_dev_handle = (dev_handle_t) IPC_GET_ARG1(*request); |
|
- | 419 | fs_index_t mp_index = (fs_index_t) IPC_GET_ARG2(*request); |
|
- | 420 | fs_handle_t mr_fs_handle = (fs_handle_t) IPC_GET_ARG3(*request); |
|
- | 421 | dev_handle_t mr_dev_handle = (dev_handle_t) IPC_GET_ARG4(*request); |
|
- | 422 | ||
- | 423 | ipc_answer_0(rid, ENOTSUP); |
|
- | 424 | } |
|
- | 425 | ||
- | 426 | void tmpfs_lookup(ipc_callid_t rid, ipc_call_t *request) |
|
- | 427 | { |
|
426 | libfs_lookup(&tmpfs_libfs_ops, tmpfs_reg.fs_handle, rid, request); |
428 | libfs_lookup(&tmpfs_libfs_ops, tmpfs_reg.fs_handle, rid, request); |
427 | } |
429 | } |
428 | 430 | ||
429 | void tmpfs_read(ipc_callid_t rid, ipc_call_t *request) |
431 | void tmpfs_read(ipc_callid_t rid, ipc_call_t *request) |
430 | { |
432 | { |