diff options
author | Ian Moffett <ian@osmora.org> | 2025-08-07 02:59:09 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-08-07 02:59:09 -0400 |
commit | c6ef9172b7f698ac6ea9e961b43d948fecd8cd8b (patch) | |
tree | 14e66fdaaa5edb5e7ee892297d5073ff1cd8401b /sys | |
parent | db88cf37d304d46a90d6d6214ad98309d7ee216a (diff) |
kernel: descrip: Fix byte count on read()
Byte count returned must be the number of bytes read() which may be less
than the number of bytes actually requested.
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_descrip.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index c8f8357..83845f6 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -241,7 +241,7 @@ fd_rw(unsigned int fd, void *buf, size_t count, uint8_t write) /* Increment the offset per read */ filedes->offset += n; - retval = count; + retval = n; done: if (kbuf != NULL) { dynfree(kbuf); |