Changes in uspace/srv/vfs/vfs.h [852b801:ffa2c8ef] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified uspace/srv/vfs/vfs.h ¶
r852b801 rffa2c8ef 34 34 #define VFS_VFS_H_ 35 35 36 #include < ipc/ipc.h>36 #include <async.h> 37 37 #include <adt/list.h> 38 #include <fibril_sync .h>38 #include <fibril_synch.h> 39 39 #include <sys/types.h> 40 40 #include <devmap.h> … … 42 42 #include <ipc/vfs.h> 43 43 44 // FIXME: according to CONFIG_DEBUG 45 // #define dprintf(...) printf(__VA_ARGS__) 46 47 #define dprintf(...) 44 #ifndef dprintf 45 #define dprintf(...) 46 #endif 48 47 49 48 /** … … 54 53 vfs_info_t vfs_info; 55 54 fs_handle_t fs_handle; 56 fibril_mutex_t phone_lock; 57 ipcarg_t phone; 55 async_sess_t session; 58 56 } fs_info_t; 59 57 … … 63 61 #define VFS_PAIR \ 64 62 fs_handle_t fs_handle; \ 65 dev _handle_t dev_handle;63 devmap_handle_t devmap_handle; 66 64 67 65 /** … … 69 67 * doesn't contain any state. For a stateful structure, see vfs_node_t. 70 68 * 71 * @note fs_handle, dev _handle and index are meant to be returned in one69 * @note fs_handle, devmap_handle and index are meant to be returned in one 72 70 * IPC reply. 73 71 */ … … 93 91 vfs_triplet_t triplet; 94 92 vfs_node_type_t type; 95 size_t size;96 unsigned lnkcnt;93 aoff64_t size; 94 unsigned int lnkcnt; 97 95 } vfs_lookup_res_t; 98 96 … … 117 115 vfs_node_type_t type; /**< Partial info about the node type. */ 118 116 119 size_t size; /**< Cached size if the node is a file. */117 aoff64_t size; /**< Cached size if the node is a file. */ 120 118 121 119 /** … … 141 139 bool append; 142 140 143 /** Current position in the file. */144 off_t pos;141 /** Current absolute position in the file. */ 142 aoff64_t pos; 145 143 } vfs_file_t; 146 144 … … 170 168 171 169 extern int vfs_grab_phone(fs_handle_t); 172 extern void vfs_release_phone( int);170 extern void vfs_release_phone(fs_handle_t, int); 173 171 174 172 extern fs_handle_t fs_name_to_handle(char *, bool); 173 extern vfs_info_t *fs_handle_to_info(fs_handle_t); 175 174 176 175 extern int vfs_lookup_internal(char *, int, vfs_lookup_res_t *, 177 176 vfs_pair_t *, ...); 178 177 extern int vfs_open_node_internal(vfs_lookup_res_t *); 178 extern int vfs_close_internal(vfs_file_t *); 179 179 180 180 extern bool vfs_nodes_init(void); 181 181 extern vfs_node_t *vfs_node_get(vfs_lookup_res_t *); 182 182 extern void vfs_node_put(vfs_node_t *); 183 extern void vfs_node_forget(vfs_node_t *); 184 extern unsigned vfs_nodes_refcount_sum_get(fs_handle_t, devmap_handle_t); 185 183 186 184 187 #define MAX_OPEN_FILES 128 185 188 186 extern bool vfs_files_init(void); 189 extern void *vfs_client_data_create(void); 190 extern void vfs_client_data_destroy(void *); 191 187 192 extern vfs_file_t *vfs_file_get(int); 188 extern int vfs_fd_alloc(void); 193 extern void vfs_file_put(vfs_file_t *); 194 extern int vfs_fd_assign(vfs_file_t *, int); 195 extern int vfs_fd_alloc(bool desc); 189 196 extern int vfs_fd_free(int); 190 191 extern void vfs_file_addref(vfs_file_t *);192 extern void vfs_file_delref(vfs_file_t *);193 197 194 198 extern void vfs_node_addref(vfs_node_t *); … … 197 201 extern void vfs_register(ipc_callid_t, ipc_call_t *); 198 202 extern void vfs_mount(ipc_callid_t, ipc_call_t *); 203 extern void vfs_unmount(ipc_callid_t, ipc_call_t *); 199 204 extern void vfs_open(ipc_callid_t, ipc_call_t *); 200 205 extern void vfs_open_node(ipc_callid_t, ipc_call_t *); 201 206 extern void vfs_sync(ipc_callid_t, ipc_call_t *); 207 extern void vfs_dup(ipc_callid_t, ipc_call_t *); 202 208 extern void vfs_close(ipc_callid_t, ipc_call_t *); 203 209 extern void vfs_read(ipc_callid_t, ipc_call_t *); … … 206 212 extern void vfs_truncate(ipc_callid_t, ipc_call_t *); 207 213 extern void vfs_fstat(ipc_callid_t, ipc_call_t *); 208 extern void vfs_fstat(ipc_callid_t, ipc_call_t *);209 214 extern void vfs_stat(ipc_callid_t, ipc_call_t *); 210 215 extern void vfs_mkdir(ipc_callid_t, ipc_call_t *);
Note:
See TracChangeset
for help on using the changeset viewer.