kern

view src/bdev.h @ 91:f83f50c17c3b

continuing with the fs added strtol and strstr to klibc
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 09 Dec 2011 15:29:54 +0200
parents 7ff2b4971216
children 083849df660b
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 dev_t bdev_by_name(const char *name);
21 #endif /* BDEV_H_ */