From a79785b90a7a6d9e963d9d5f7c650c8a01f0522f Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Wed, 10 Apr 2024 19:44:56 -0400 Subject: kernel: devfs: Div roundup by blocksize Signed-off-by: Ian Moffett --- sys/fs/devfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/fs') 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); -- cgit v1.2.3