kern
diff 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 diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/bdev.h Fri Dec 09 13:44:15 2011 +0200 1.3 @@ -0,0 +1,19 @@ 1.4 +#ifndef BDEV_H_ 1.5 +#define BDEV_H_ 1.6 + 1.7 +#include "fs.h" /* for dev_t */ 1.8 + 1.9 +/* TODO buffer cache */ 1.10 + 1.11 +struct block_device { 1.12 + int ata_dev; 1.13 + uint32_t offset, size; 1.14 +}; 1.15 + 1.16 +struct block_device *blk_open(dev_t dev); 1.17 +void blk_close(struct block_device *bdev); 1.18 + 1.19 +int blk_read(struct block_device *bdev, uint32_t blk, void *buf); 1.20 +int blk_write(struct block_device *bdev, uint32_t blk, void *buf); 1.21 + 1.22 +#endif /* BDEV_H_ */