Libfs


Files

file  libfs.c
 Glue code which is common to all FS implementations.
file  libfs.h

Data Structures

struct  fs_node_t
struct  fs_reg_t
struct  libfs_ops_t
struct  mp_data_t

Defines

#define answer_and_return(rid, rc)
#define combine_rc(rc1, rc2)   ((rc1) == EOK ? (rc2) : (rc1))
#define on_error(rc, action)

Functions

void fs_node_initialize (fs_node_t *fn)
int fs_register (int vfs_phone, fs_reg_t *reg, vfs_info_t *info, async_client_conn_t conn)
 Register file system server.
void libfs_lookup (libfs_ops_t *ops, fs_handle_t fs_handle, ipc_callid_t rid, ipc_call_t *request)
 Lookup VFS triplet by name in the file system name space.
void libfs_mount (libfs_ops_t *ops, fs_handle_t fs_handle, ipc_callid_t rid, ipc_call_t *request)
void libfs_open_node (libfs_ops_t *ops, fs_handle_t fs_handle, ipc_callid_t rid, ipc_call_t *request)
 Open VFS triplet.
void libfs_stat (libfs_ops_t *ops, fs_handle_t fs_handle, ipc_callid_t rid, ipc_call_t *request)
void libfs_unmount (libfs_ops_t *ops, ipc_callid_t rid, ipc_call_t *request)

Function Documentation

int fs_register ( int  vfs_phone,
fs_reg_t reg,
vfs_info_t info,
async_client_conn_t  conn 
)

Register file system server.

This function abstracts away the tedious registration protocol from file system implementations and lets them to reuse this registration glue code.

Parameters:
vfs_phone Open phone for communication with VFS.
reg File system registration structure. It will be initialized by this function.
info VFS info structure supplied by the file system implementation.
conn Connection fibril for handling all calls originating in VFS.
Returns:
EOK on success or a non-zero error code on errror.

Definition at line 80 of file libfs.c.

void libfs_lookup ( libfs_ops_t ops,
fs_handle_t  fs_handle,
ipc_callid_t  rid,
ipc_call_t request 
)

Lookup VFS triplet by name in the file system name space.

The path passed in the PLB must be in the canonical file system path format as returned by the canonify() function.

Parameters:
ops libfs operations structure with function pointers to file system implementation
fs_handle File system handle of the file system where to perform the lookup.
rid Request ID of the VFS_OUT_LOOKUP request.
request VFS_OUT_LOOKUP request data itself.

Definition at line 271 of file libfs.c.

void libfs_open_node ( libfs_ops_t ops,
fs_handle_t  fs_handle,
ipc_callid_t  rid,
ipc_call_t request 
)

Open VFS triplet.

Parameters:
ops libfs operations structure with function pointers to file system implementation
rid Request ID of the VFS_OUT_OPEN_NODE request.
request VFS_OUT_OPEN_NODE request data itself.

Definition at line 614 of file libfs.c.


Generated on Thu Jun 2 07:45:57 2011 for HelenOS/USB by  doxygen 1.4.7