From 2ddbeb9f7214f6d3feef651eba83e6a9d120a743 Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Thu, 13 Aug 2020 17:58:50 -0400 Subject: lots of progress, including readonly PATA driver and part of FAT16 driver --- src/kernel/util.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/kernel/util.c') diff --git a/src/kernel/util.c b/src/kernel/util.c index 1531f83..29d7e3f 100644 --- a/src/kernel/util.c +++ b/src/kernel/util.c @@ -1,10 +1,10 @@ -#include -#include "panic.h" #include +#include #include "drive.h" -void memcpy(void *to, void *from, uint32_t n) { - uint32_t *tp = to, *fp = from; +void memcpy(void *to, const void *from, uint32_t n) { + uint32_t *tp = to; + const uint32_t *fp = from; while (n >= 4) { *(tp++) = *(fp++); n -= 4; @@ -14,7 +14,7 @@ void memcpy(void *to, void *from, uint32_t n) { *(tpp++) = *(fpp++); } -void fmcpy(void *to, struct drive *d, drive_file_id_t f, uint32_t from, uint32_t n) { +void fmcpy(void *to, const struct drive *d, drive_file_id_t f, uint32_t from, uint32_t n) { uint8_t buf[512]; d->load_sector(d, f, from >> 9, buf); uint16_t from_low = from & 511; -- cgit v1.2.3