Changeset 8c20b26 in mainline
- Timestamp:
- 2007-09-26T22:05:22Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5d4e90f0
- Parents:
- 01f5e17
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/vfs/vfs.h
r01f5e17 r8c20b26 36 36 #include <ipc/ipc.h> 37 37 #include <libadt/list.h> 38 #include <atomic.h> 39 #include <types.h> 38 40 39 41 #define dprintf(...) printf(__VA_ARGS__) … … 42 44 43 45 #define IPC_METHOD_TO_VFS_OP(m) ((m) - VFS_FIRST) 46 47 typedef int64_t off_t; 44 48 45 49 typedef enum { … … 85 89 } vfs_info_t; 86 90 91 /** 92 * A structure like this will be allocated for each registered file system. 93 */ 87 94 typedef struct { 88 95 link_t fs_link; … … 90 97 ipcarg_t phone; 91 98 } fs_info_t; 99 100 /** 101 * Instances of this type represent a file system node (e.g. directory, file). 102 * They are abstracted away from any file system implementation and contain just 103 * enough bits to uniquely identify the object in its file system instance. 104 * 105 * @note fs_handle, dev_handle and index are meant to be returned in one 106 * IPC reply. 107 */ 108 typedef struct { 109 int fs_handle; /**< Global file system ID. */ 110 int dev_handle; /**< Global mount device devno. */ 111 uint64_t index; /**< Index of the node on its file system. */ 112 } vfs_node_t; 113 114 /** 115 * Instances of this type represent an open file. If the file is opened by more 116 * than one task, there will be a separate structure allocated for each task. 117 */ 118 typedef struct { 119 vfs_node_t *node; 120 121 /** Number of file handles referencing this file. */ 122 atomic_t refcnt; 123 124 /** Current position in the file. */ 125 off_t pos; 126 } vfs_file_t; 92 127 93 128 extern link_t fs_head;
Note:
See TracChangeset
for help on using the changeset viewer.