Changeset b33ec43 in mainline for uspace/lib/fs/libfs.c


Ignore:
Timestamp:
2011-08-18T12:10:23Z (13 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
27b76ca
Parents:
7171760
Message:

Remove support for directly opening nodes from VFS and libfs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/fs/libfs.c

    r7171760 rb33ec43  
    7272    ipc_call_t *);
    7373static 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 *);
    7674
    7775static void vfs_out_mounted(ipc_callid_t rid, ipc_call_t *req)
     
    198196}
    199197
    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 
    205198static void vfs_out_stat(ipc_callid_t rid, ipc_call_t *req)
    206199{
     
    267260                case VFS_OUT_DESTROY:
    268261                        vfs_out_destroy(callid, &call);
    269                         break;
    270                 case VFS_OUT_OPEN_NODE:
    271                         vfs_out_open_node(callid, &call);
    272262                        break;
    273263                case VFS_OUT_STAT:
     
    845835}
    846836
    847 /** Open VFS triplet.
    848  *
    849  * @param ops     libfs operations structure with function pointers to
    850  *                file system implementation
    851  * @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 
    879837/** @}
    880838 */
Note: See TracChangeset for help on using the changeset viewer.