diff options
author | Ian Moffett <ian@osmora.org> | 2024-03-26 18:02:55 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2024-03-26 18:03:41 -0400 |
commit | 4048b75fd22d5e7506681cc81feeed8930d5915d (patch) | |
tree | c873a944337a7b0b9df4d4acebe84360b431d882 /sys/fs/initramfs.c | |
parent | 2aca04b209a1fdba618052304be1d211000921bb (diff) |
kernel: initramfs: Fix vop_read()
vop_read() should return the actual count
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/fs/initramfs.c')
-rw-r--r-- | sys/fs/initramfs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/fs/initramfs.c b/sys/fs/initramfs.c index 6da0929..5b31bf9 100644 --- a/sys/fs/initramfs.c +++ b/sys/fs/initramfs.c @@ -137,12 +137,12 @@ vop_read(struct vnode *vp, char *buf, size_t count) for (size_t i = 0; i < count; ++i) { if (i >= size) { - break; + return i + 1; } buf[i] = contents[i]; } - return size; + return count; } static char * |