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