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 char bdev_id[DEV_ID_SIZE];
15 char name[PARTITION_NAME_SIZE];
16 struct blkio_context* blkio;
25 char part_name[PARTITION_NAME_SIZE];
28 } __attribute__((packed));
30 // Lunaix Partition Table
38 } __attribute__((packed));
40 typedef u64_t partition_t;
41 typedef uint32_t bdev_t;
42 typedef void (*devfs_exporter)(struct block_dev* bdev, void* fsnode);
48 block_alloc_dev(const char* blk_id, void* driver, req_handler ioreq_handler);
51 block_mount(struct block_dev* bdev, devfs_exporter export);
57 blk_set_blkmapping(struct block_dev* bdev, void* fsnode);
59 #endif /* __LUNAIX_BLOCK_H */