summaryrefslogtreecommitdiffstats
path: root/include/pbl/bio.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/pbl/bio.h')
-rw-r--r--include/pbl/bio.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/pbl/bio.h b/include/pbl/bio.h
new file mode 100644
index 0000000000..79e47451a0
--- /dev/null
+++ b/include/pbl/bio.h
@@ -0,0 +1,19 @@
+#ifndef __PBL_BIO_H__
+#define __PBL_BIO_H__
+
+#include <linux/types.h>
+
+struct pbl_bio {
+ void *priv;
+ int (*read)(struct pbl_bio *bio, off_t block_off, void *buf, unsigned nblocks);
+};
+
+static inline int pbl_bio_read(struct pbl_bio *bio, off_t block_off,
+ void *buf, unsigned nblocks)
+{
+ return bio->read(bio, block_off, buf, nblocks);
+}
+
+ssize_t pbl_fat_load(struct pbl_bio *, const char *filename, void *dest, size_t len);
+
+#endif /* __PBL_H__ */