kern

view src/bdev.h @ 90:7ff2b4971216

started work on the filesystem
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 09 Dec 2011 13:44:15 +0200
parents
children f83f50c17c3b
line source
1 #ifndef BDEV_H_
2 #define BDEV_H_
4 #include "fs.h" /* for dev_t */
6 /* TODO buffer cache */
8 struct block_device {
9 int ata_dev;
10 uint32_t offset, size;
11 };
13 struct block_device *blk_open(dev_t dev);
14 void blk_close(struct block_device *bdev);
16 int blk_read(struct block_device *bdev, uint32_t blk, void *buf);
17 int blk_write(struct block_device *bdev, uint32_t blk, void *buf);
19 #endif /* BDEV_H_ */