/src/barebox/include/pbl/bio.h
Line | Count | Source |
1 | | #ifndef __PBL_BIO_H__ |
2 | | #define __PBL_BIO_H__ |
3 | | |
4 | | #include <linux/types.h> |
5 | | |
6 | | struct pbl_bio { |
7 | | void *priv; |
8 | | int (*read)(struct pbl_bio *bio, off_t block_off, void *buf, unsigned nblocks); |
9 | | }; |
10 | | |
11 | | static inline int pbl_bio_read(struct pbl_bio *bio, off_t block_off, |
12 | | void *buf, unsigned nblocks) |
13 | 0 | { |
14 | 0 | return bio->read(bio, block_off, buf, nblocks); |
15 | 0 | } |
16 | | |
17 | | ssize_t pbl_fat_load(struct pbl_bio *, const char *filename, void *dest, size_t len); |
18 | | |
19 | | #endif /* __PBL_H__ */ |