Changeset b33ec43 in mainline for uspace/lib/fs/libfs.c
- Timestamp:
- 2011-08-18T12:10:23Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 27b76ca
- Parents:
- 7171760
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/fs/libfs.c
r7171760 rb33ec43 72 72 ipc_call_t *); 73 73 static void libfs_stat(libfs_ops_t *, fs_handle_t, ipc_callid_t, ipc_call_t *); 74 static void libfs_open_node(libfs_ops_t *, fs_handle_t, ipc_callid_t,75 ipc_call_t *);76 74 77 75 static void vfs_out_mounted(ipc_callid_t rid, ipc_call_t *req) … … 198 196 } 199 197 200 static void vfs_out_open_node(ipc_callid_t rid, ipc_call_t *req)201 {202 libfs_open_node(libfs_ops, reg.fs_handle, rid, req);203 }204 205 198 static void vfs_out_stat(ipc_callid_t rid, ipc_call_t *req) 206 199 { … … 267 260 case VFS_OUT_DESTROY: 268 261 vfs_out_destroy(callid, &call); 269 break;270 case VFS_OUT_OPEN_NODE:271 vfs_out_open_node(callid, &call);272 262 break; 273 263 case VFS_OUT_STAT: … … 845 835 } 846 836 847 /** Open VFS triplet.848 *849 * @param ops libfs operations structure with function pointers to850 * file system implementation851 * @param rid Request ID of the VFS_OUT_OPEN_NODE request.852 * @param request VFS_OUT_OPEN_NODE request data itself.853 *854 */855 void libfs_open_node(libfs_ops_t *ops, fs_handle_t fs_handle, ipc_callid_t rid,856 ipc_call_t *request)857 {858 devmap_handle_t devmap_handle = IPC_GET_ARG1(*request);859 fs_index_t index = IPC_GET_ARG2(*request);860 861 fs_node_t *fn;862 int rc = ops->node_get(&fn, devmap_handle, index);863 on_error(rc, answer_and_return(rid, rc));864 865 if (fn == NULL) {866 async_answer_0(rid, ENOENT);867 return;868 }869 870 rc = ops->node_open(fn);871 aoff64_t size = ops->size_get(fn);872 async_answer_4(rid, rc, LOWER32(size), UPPER32(size),873 ops->lnkcnt_get(fn),874 (ops->is_file(fn) ? L_FILE : 0) | (ops->is_directory(fn) ? L_DIRECTORY : 0));875 876 (void) ops->node_put(fn);877 }878 879 837 /** @} 880 838 */
Note:
See TracChangeset
for help on using the changeset viewer.