Warning: That file was not part of the compilation database. It may have many parsing errors.
| 1 | /* @title: devtmpfs */ |
|---|---|
| 2 | #include <stddef.h> |
| 3 | #include <stdint.h> |
| 4 | #pragma once |
| 5 | |
| 6 | enum devtmpfs_node_type { |
| 7 | DEVTMPFS_DIR, |
| 8 | DEVTMPFS_FILE, |
| 9 | DEVTMPFS_SYMLINK, |
| 10 | }; |
| 11 | |
| 12 | struct devtmpfs_node { |
| 13 | enum devtmpfs_node_type type; |
| 14 | struct vfs_node *vfs; // back-pointer to the VFS node |
| 15 | |
| 16 | struct devtmpfs_node **children; // of `devtmpfs_node*` |
| 17 | |
| 18 | char *data; |
| 19 | uint64_t size; |
| 20 | |
| 21 | enum err (*read)(struct vfs_node *, void *buf, uint64_t size, |
| 22 | uint64_t offset, void *ctx); |
| 23 | enum err (*write)(struct vfs_node *, const void *buf, uint64_t size, |
| 24 | uint64_t offset, void *ctx); |
| 25 | void *rw_ctx; |
| 26 | }; |
| 27 |
Warning: That file was not part of the compilation database. It may have many parsing errors.