block: clarify parameter name

Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
Michael Shaw 2026-07-12 15:58:04 -04:00
commit 334bff74bc
3 changed files with 10 additions and 10 deletions

View file

@ -26,14 +26,14 @@ static ssize_t i_write_chr(inode_t *inode, char *buf, size_t size, size_t offset
return size; return size;
} }
static ssize_t i_read_blk(inode_t *inode, char *buf, size_t size, size_t offset) static ssize_t i_read_blk(inode_t *inode, char *buf, size_t n_blocks, size_t offset)
{ {
return block_read(inode->data, buf, offset, size); return block_read(inode->data, buf, offset, n_blocks);
} }
static ssize_t i_write_blk(inode_t *inode, char *buf, size_t size, size_t offset) static ssize_t i_write_blk(inode_t *inode, char *buf, size_t n_blocks, size_t offset)
{ {
return block_write(inode->data, buf, offset, size); return block_write(inode->data, buf, offset, n_blocks);
} }
static int devfs_insert_device(const char *name, u64 mode, dirent_t **out) static int devfs_insert_device(const char *name, u64 mode, dirent_t **out)

View file

@ -18,7 +18,7 @@ struct block_device {
struct block_ops ops; struct block_ops ops;
}; };
ssize_t block_read(struct block_device *dev, char *buf, size_t offset, size_t n); ssize_t block_read(struct block_device *dev, char *buf, size_t offset, size_t n_blocks);
ssize_t block_write(struct block_device *dev, char *buf, size_t offset, size_t n); ssize_t block_write(struct block_device *dev, char *buf, size_t offset, size_t n_blocks);
#endif /* _BLOCK_H_ */ #endif /* _BLOCK_H_ */

View file

@ -2,12 +2,12 @@
#include <kernel/common.h> #include <kernel/common.h>
#include <kernel/block.h> #include <kernel/block.h>
ssize_t block_read(struct block_device *dev, char *buf, size_t offset, size_t n) ssize_t block_read(struct block_device *dev, char *buf, size_t offset, size_t n_blocks)
{ {
return dev->ops.read(dev, buf, offset, n); return dev->ops.read(dev, buf, offset, n_blocks);
} }
ssize_t block_write(struct block_device *dev, char *buf, size_t offset, size_t n) ssize_t block_write(struct block_device *dev, char *buf, size_t offset, size_t n_blocks)
{ {
return dev->ops.write(dev, buf, offset, n); return dev->ops.write(dev, buf, offset, n_blocks);
} }