diff options
Diffstat (limited to 'include/kernel')
| -rw-r--r-- | include/kernel/fd.h | 12 | ||||
| -rw-r--r-- | include/kernel/fs.h | 10 |
2 files changed, 19 insertions, 3 deletions
diff --git a/include/kernel/fd.h b/include/kernel/fd.h new file mode 100644 index 0000000..07cf454 --- /dev/null +++ b/include/kernel/fd.h @@ -0,0 +1,12 @@ +#ifndef _FD_H +#define _FD_H + +#include <kernel/fs.h> +#include <stdint.h> +#include <sys/types.h> + +void fd_init(void); + +void fd_block_read(struct buffer*); + +#endif diff --git a/include/kernel/fs.h b/include/kernel/fs.h index 4ec4de1..1b4ed24 100644 --- a/include/kernel/fs.h +++ b/include/kernel/fs.h @@ -52,16 +52,20 @@ struct m_inode { struct buffer { void *b_data; + int b_present; uint16_t b_device; uint16_t b_block; + struct task_struct *b_wait; struct buffer *b_next; struct buffer *b_prev; -} __attribute__((packed)); +}; extern struct super_block sblocks[NRSUPER]; -int block_read(void*, size_t); -int block_write(void*, size_t); +void block_read(struct buffer*); +void block_write(struct buffer*); + +struct buffer *buffer_get_block(uint16_t, uint16_t); void mount_root(void); |
