aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/fs/devfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/fs/devfs.c b/sys/fs/devfs.c
index 31a135f..c185f2e 100644
--- a/sys/fs/devfs.c
+++ b/sys/fs/devfs.c
@@ -83,7 +83,7 @@ blkdev_read(struct device *dev, struct device_node *node, struct sio_txn *sio)
return -ENOMEM;
}
- dev_txn.len = __DIV_ROUNDUP(sio->len, 512);
+ dev_txn.len = __DIV_ROUNDUP(sio->len, dev->blocksize);
dev_txn.buf = buf;
dev_txn.offset = sio->offset;
dev->read(dev, &dev_txn);