gunzip.c: use block layer for writes
Call blk_dwrite to ensure that the block cache is notified
if enabled and remove build breakage when CONFIG_BLK is enabled.
Signed-off-by: Eric Nelson <eric@nelint.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
diff --git a/lib/gunzip.c b/lib/gunzip.c
index 6d65ccc..bc746d6 100644
--- a/lib/gunzip.c
+++ b/lib/gunzip.c
@@ -232,9 +232,8 @@
gzwrite_progress(iteration++,
totalfilled,
szexpected);
- blocks_written = dev->block_write(dev, outblock,
- writeblocks,
- writebuf);
+ blocks_written = blk_dwrite(dev, outblock,
+ writeblocks, writebuf);
outblock += blocks_written;
if (ctrlc()) {
puts("abort\n");