Rev 3109 | Rev 4306 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 3109 | Rev 3247 | ||
|---|---|---|---|
| Line 42... | Line 42... | ||
| 42 | 42 | ||
| 43 | #ifndef dprintf |
43 | #ifndef dprintf |
| 44 | #define dprintf(...) printf(__VA_ARGS__) |
44 | #define dprintf(...) printf(__VA_ARGS__) |
| 45 | #endif |
45 | #endif |
| 46 | 46 | ||
| - | 47 | typedef enum { |
|
| - | 48 | TMPFS_NONE, |
|
| - | 49 | TMPFS_FILE, |
|
| - | 50 | TMPFS_DIRECTORY |
|
| - | 51 | } tmpfs_dentry_type_t; |
|
| - | 52 | ||
| 47 | typedef struct tmpfs_dentry { |
53 | typedef struct tmpfs_dentry { |
| 48 | fs_index_t index; /**< TMPFS node index. */ |
54 | fs_index_t index; /**< TMPFS node index. */ |
| 49 | link_t dh_link; /**< Dentries hash table link. */ |
55 | link_t dh_link; /**< Dentries hash table link. */ |
| 50 | struct tmpfs_dentry *sibling; |
56 | struct tmpfs_dentry *sibling; |
| 51 | struct tmpfs_dentry *child; |
57 | struct tmpfs_dentry *child; |
| 52 | hash_table_t names; /**< All names linking to this TMPFS node. */ |
58 | hash_table_t names; /**< All names linking to this TMPFS node. */ |
| 53 | enum { |
- | |
| 54 | TMPFS_NONE, |
- | |
| 55 | TMPFS_FILE, |
- | |
| 56 | TMPFS_DIRECTORY |
- | |
| 57 | } type; |
59 | tmpfs_dentry_type_t type; |
| 58 | unsigned lnkcnt; /**< Link count. */ |
60 | unsigned lnkcnt; /**< Link count. */ |
| 59 | size_t size; /**< File size if type is TMPFS_FILE. */ |
61 | size_t size; /**< File size if type is TMPFS_FILE. */ |
| 60 | void *data; /**< File content's if type is TMPFS_FILE. */ |
62 | void *data; /**< File content's if type is TMPFS_FILE. */ |
| 61 | } tmpfs_dentry_t; |
63 | } tmpfs_dentry_t; |
| 62 | 64 | ||