aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-04-10 19:44:56 -0400
committerIan Moffett <ian@osmora.org>2024-04-10 19:44:56 -0400
commita79785b90a7a6d9e963d9d5f7c650c8a01f0522f (patch)
treea614a1c409fdb87a7bae678205453ecbd6a6313f /sys
parent7bec3248baf2ee5b2e01ba17639f969aa471dc35 (diff)
kernel: devfs: Div roundup by blocksize
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys')
-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);