summaryrefslogtreecommitdiff
path: root/api/api_storage.c
diff options
context:
space:
mode:
Diffstat (limited to 'api/api_storage.c')
-rw-r--r--api/api_storage.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/api/api_storage.c b/api/api_storage.c
index e80818df1c..a5357bc9cf 100644
--- a/api/api_storage.c
+++ b/api/api_storage.c
@@ -331,10 +331,14 @@ lbasize_t dev_read_stor(void *cookie, void *buf, lbasize_t len, lbastart_t start
if (!dev_stor_is_valid(type, dd))
return 0;
+#ifdef CONFIG_BLK
+ return blk_dread(dd, start, len, buf);
+#else
if ((dd->block_read) == NULL) {
debugf("no block_read() for device 0x%08x\n", cookie);
return 0;
}
return dd->block_read(dd, start, len, buf);
+#endif /* defined(CONFIG_BLK) */
}