Changes in uspace/lib/fs/libfs.h [5bf76c1:ffa2c8ef] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/fs/libfs.h
r5bf76c1 rffa2c8ef 40 40 #include <stdint.h> 41 41 #include <async.h> 42 #include <loc.h> 43 44 typedef struct { 45 int (* mounted)(service_id_t, const char *, fs_index_t *, aoff64_t *, 46 unsigned *); 47 int (* unmounted)(service_id_t); 48 int (* read)(service_id_t, fs_index_t, aoff64_t, size_t *); 49 int (* write)(service_id_t, fs_index_t, aoff64_t, size_t *, 50 aoff64_t *); 51 int (* truncate)(service_id_t, fs_index_t, aoff64_t); 52 int (* close)(service_id_t, fs_index_t); 53 int (* destroy)(service_id_t, fs_index_t); 54 int (* sync)(service_id_t, fs_index_t); 55 } vfs_out_ops_t; 42 #include <devmap.h> 56 43 57 44 typedef struct { 58 45 bool mp_active; 59 async_sess_t *sess;46 int phone; 60 47 fs_handle_t fs_handle; 61 service_id_t service_id;48 devmap_handle_t devmap_handle; 62 49 } mp_data_t; 63 50 … … 73 60 * argument holds the output argument. 74 61 */ 75 int (* root_get)(fs_node_t **, service_id_t);62 int (* root_get)(fs_node_t **, devmap_handle_t); 76 63 int (* match)(fs_node_t **, fs_node_t *, const char *); 77 int (* node_get)(fs_node_t **, service_id_t, fs_index_t);64 int (* node_get)(fs_node_t **, devmap_handle_t, fs_index_t); 78 65 int (* node_open)(fs_node_t *); 79 66 int (* node_put)(fs_node_t *); 80 int (* create)(fs_node_t **, service_id_t, int);67 int (* create)(fs_node_t **, devmap_handle_t, int); 81 68 int (* destroy)(fs_node_t *); 82 69 int (* link)(fs_node_t *, fs_node_t *, const char *); … … 84 71 int (* has_children)(bool *, fs_node_t *); 85 72 /* 86 * The second set of methods are usually mere getters that do not 87 * returnan integer error code.73 * The second set of methods are usually mere getters that do not return 74 * an integer error code. 88 75 */ 89 76 fs_index_t (* index_get)(fs_node_t *); 90 77 aoff64_t (* size_get)(fs_node_t *); 91 78 unsigned int (* lnkcnt_get)(fs_node_t *); 79 char (* plb_get_char)(unsigned pos); 92 80 bool (* is_directory)(fs_node_t *); 93 81 bool (* is_file)(fs_node_t *); 94 service_id_t (* service_get)(fs_node_t *);82 devmap_handle_t (* device_get)(fs_node_t *); 95 83 } libfs_ops_t; 96 84 … … 100 88 } fs_reg_t; 101 89 102 extern int fs_register(async_sess_t *, vfs_info_t *, vfs_out_ops_t *, 103 libfs_ops_t *); 90 extern int fs_register(int, fs_reg_t *, vfs_info_t *, async_client_conn_t); 104 91 105 92 extern void fs_node_initialize(fs_node_t *); 106 93 107 extern int fs_instance_create(service_id_t, void *); 108 extern int fs_instance_get(service_id_t, void **); 109 extern int fs_instance_destroy(service_id_t); 94 extern void libfs_mount(libfs_ops_t *, fs_handle_t, ipc_callid_t, ipc_call_t *); 95 extern void libfs_unmount(libfs_ops_t *, ipc_callid_t, ipc_call_t *); 96 extern void libfs_lookup(libfs_ops_t *, fs_handle_t, ipc_callid_t, ipc_call_t *); 97 extern void libfs_stat(libfs_ops_t *, fs_handle_t, ipc_callid_t, ipc_call_t *); 98 extern void libfs_open_node(libfs_ops_t *, fs_handle_t, ipc_callid_t, 99 ipc_call_t *); 110 100 111 101 #endif
Note:
See TracChangeset
for help on using the changeset viewer.