1 #ifndef __LUNAIX_BLOCK_H
2 #define __LUNAIX_BLOCK_H
4 #include <hal/ahci/hba.h>
5 #include <lunaix/blkio.h>
6 #include <lunaix/device.h>
8 #define LPT_SIG 0x414e554c
9 #define PARTITION_NAME_SIZE 48
10 #define DEV_ID_SIZE 32
14 struct llist_header parts;
15 struct blkio_context* blkio;
17 char bdev_id[DEV_ID_SIZE];
18 char name[PARTITION_NAME_SIZE];
25 // Lunaix Partition Table
33 } __attribute__((packed));
35 typedef u64_t partition_t;
36 typedef uint32_t bdev_t;
37 typedef void (*devfs_exporter)(struct block_dev* bdev, void* fsnode);
43 block_alloc_dev(const char* blk_id, void* driver, req_handler ioreq_handler);
46 block_mount(struct block_dev* bdev, devfs_exporter export);
52 blk_set_blkmapping(struct block_dev* bdev, void* fsnode);
55 blk_mount_part(struct block_dev* bdev,
61 #endif /* __LUNAIX_BLOCK_H */