diff options
author | Marvin Borner | 2020-01-20 23:12:54 +0100 |
---|---|---|
committer | Marvin Borner | 2020-01-20 23:12:54 +0100 |
commit | 391ed256d21a6ae2e2456d1809f357e6e96e15d1 (patch) | |
tree | 0fe9ffb3c59bbfeb3d8a04ab7fc6efba60d81e79 /src/kernel/fs/marfs/sectorlevel.c | |
parent | d5d1749257ff8b9aa6b5ace4b4720b484a2860f3 (diff) |
Added pure awesomeness
Actually quite some days of work but ok
Diffstat (limited to 'src/kernel/fs/marfs/sectorlevel.c')
-rw-r--r-- | src/kernel/fs/marfs/sectorlevel.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/kernel/fs/marfs/sectorlevel.c b/src/kernel/fs/marfs/sectorlevel.c index d905315..8302054 100644 --- a/src/kernel/fs/marfs/sectorlevel.c +++ b/src/kernel/fs/marfs/sectorlevel.c @@ -1,7 +1,7 @@ #include <stdint.h> -#include <kernel/lib/stdlib.h> #include <kernel/fs/ata_pio.h> #include <kernel/fs/marfs/marfs.h> +#include <kernel/memory/kheap.h> uint8_t marfs_init(struct ata_interface *_interface) { @@ -62,7 +62,7 @@ static uint8_t marfs_mark_block(uint32_t lba_sector, uint8_t mode) { lba_sector -= 2; lba_sector -= sb_cache.s_first_chunk; - uint16_t block_in_chunk = lba_sector % 512; + uint16_t block_in_chunk = (uint16_t) (lba_sector % 512); lba_sector /= 512; lba_sector = 2 + sb_cache.s_first_chunk + (512 * lba_sector); |