diff options
Diffstat (limited to 'src/kernel/util.c')
-rw-r--r-- | src/kernel/util.c | 10 |
1 files changed, 5 insertions, 5 deletions
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 <stdint.h> -#include "panic.h" #include <stdbool.h> +#include <stdint.h> #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; |