Rev 4419 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4419 | Rev 4420 | ||
---|---|---|---|
Line 36... | Line 36... | ||
36 | #include <ipc/ipc.h> |
36 | #include <ipc/ipc.h> |
37 | #include <libadt/list.h> |
37 | #include <libadt/list.h> |
38 | #include <futex.h> |
38 | #include <futex.h> |
39 | #include <rwlock.h> |
39 | #include <rwlock.h> |
40 | #include <sys/types.h> |
40 | #include <sys/types.h> |
- | 41 | #include <devmap.h> |
|
41 | #include <bool.h> |
42 | #include <bool.h> |
42 | 43 | ||
43 | // FIXME: according to CONFIG_DEBUG |
44 | // FIXME: according to CONFIG_DEBUG |
44 | // #define dprintf(...) printf(__VA_ARGS__) |
45 | // #define dprintf(...) printf(__VA_ARGS__) |
45 | 46 | ||
Line 47... | Line 48... | ||
47 | 48 | ||
48 | #define VFS_FIRST IPC_FIRST_USER_METHOD |
49 | #define VFS_FIRST IPC_FIRST_USER_METHOD |
49 | 50 | ||
50 | /* Basic types. */ |
51 | /* Basic types. */ |
51 | typedef int16_t fs_handle_t; |
52 | typedef int16_t fs_handle_t; |
52 | typedef int16_t dev_handle_t; |
- | |
53 | typedef uint32_t fs_index_t; |
53 | typedef uint32_t fs_index_t; |
54 | 54 | ||
55 | typedef enum { |
55 | typedef enum { |
56 | VFS_READ = VFS_FIRST, |
56 | VFS_READ = VFS_FIRST, |
57 | VFS_WRITE, |
57 | VFS_WRITE, |
Line 164... | Line 164... | ||
164 | * L_UNLINK is used to remove leaves from the file system namespace. This flag |
164 | * L_UNLINK is used to remove leaves from the file system namespace. This flag |
165 | * cannot be passed directly by the client, but will be set by VFS during |
165 | * cannot be passed directly by the client, but will be set by VFS during |
166 | * VFS_UNLINK. |
166 | * VFS_UNLINK. |
167 | */ |
167 | */ |
168 | #define L_UNLINK 32 |
168 | #define L_UNLINK 32 |
169 | /** |
- | |
170 | * L_PARENT performs a lookup but returns the triplet of the parent node. |
- | |
171 | * This flag may not be combined with any other lookup flag. |
- | |
172 | */ |
- | |
173 | #define L_PARENT 64 |
- | |
174 | 169 | ||
175 | typedef enum vfs_node_type { |
170 | typedef enum vfs_node_type { |
176 | VFS_NODE_UNKNOWN, |
171 | VFS_NODE_UNKNOWN, |
177 | VFS_NODE_FILE, |
172 | VFS_NODE_FILE, |
178 | VFS_NODE_DIRECTORY, |
173 | VFS_NODE_DIRECTORY, |
Line 252... | Line 247... | ||
252 | 247 | ||
253 | extern futex_t plb_futex; /**< Futex protecting plb and plb_head. */ |
248 | extern futex_t plb_futex; /**< Futex protecting plb and plb_head. */ |
254 | extern uint8_t *plb; /**< Path Lookup Buffer */ |
249 | extern uint8_t *plb; /**< Path Lookup Buffer */ |
255 | extern link_t plb_head; /**< List of active PLB entries. */ |
250 | extern link_t plb_head; /**< List of active PLB entries. */ |
256 | 251 | ||
- | 252 | #define MAX_MNTOPTS_LEN 256 |
|
- | 253 | ||
257 | /** Holding this rwlock prevents changes in file system namespace. */ |
254 | /** Holding this rwlock prevents changes in file system namespace. */ |
258 | extern rwlock_t namespace_rwlock; |
255 | extern rwlock_t namespace_rwlock; |
259 | 256 | ||
260 | extern int vfs_grab_phone(fs_handle_t); |
257 | extern int vfs_grab_phone(fs_handle_t); |
261 | extern void vfs_release_phone(int); |
258 | extern void vfs_release_phone(int); |