Changeset 4d21cf8 in mainline for uspace/srv/vfs/vfs.h
- Timestamp:
- 2007-11-03T14:23:57Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 20614d0
- Parents:
- fa23560
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/vfs/vfs.h
rfa23560 r4d21cf8 100 100 101 101 /** 102 * Instances of this type represent a file system node (e.g. directory, file). 103 * They are abstracted away from any file system implementation and contain just 104 * enough bits to uniquely identify the object in its file system instance. 102 * VFS_PAIR uniquely represents a file system instance. 103 */ 104 #define VFS_PAIR \ 105 int fs_handle; \ 106 int dev_handle; 107 108 /** 109 * VFS_TRIPLET uniquely identifies a file system node (e.g. directory, file) but 110 * doesn't contain any state. For a stateful structure, see vfs_node_t. 105 111 * 106 112 * @note fs_handle, dev_handle and index are meant to be returned in one 107 113 * IPC reply. 108 114 */ 115 #define VFS_TRIPLET \ 116 VFS_PAIR; \ 117 uint64_t index; 118 109 119 typedef struct { 110 int fs_handle; /**< Global file system ID. */ 111 int dev_handle; /**< Global mount device devno. */ 112 uint64_t index; /**< Index of the node on its file system. */ 120 VFS_PAIR; 121 } vfs_pair_t; 122 123 typedef struct { 124 VFS_TRIPLET; 125 } vfs_triplet_t; 126 127 /** 128 * Instances of this type represent an active, in-memory VFS node and any state 129 * which may be associated with it. 130 */ 131 typedef struct { 132 VFS_TRIPLET; /**< Identity of the node. */ 133 atomic_t refcnt; /**< Usage counter. */ 113 134 } vfs_node_t; 114 135 … … 129 150 extern link_t fs_head; /**< List of registered file systems. */ 130 151 131 extern vfs_ node_t rootfs; /**< Root node of the root file system. */152 extern vfs_triplet_t rootfs; /**< Root node of the root file system. */ 132 153 133 154 #define MAX_PATH_LEN (64 * 1024) … … 151 172 extern int fs_name_to_handle(char *, bool); 152 173 153 extern int vfs_lookup_internal(char *, size_t, vfs_ node_t *, vfs_node_t *);174 extern int vfs_lookup_internal(char *, size_t, vfs_triplet_t *, vfs_pair_t *); 154 175 155 176 #define MAX_OPEN_FILES 128
Note:
See TracChangeset
for help on using the changeset viewer.