diff options
author | Marvin Borner | 2020-11-05 17:30:39 +0100 |
---|---|---|
committer | Marvin Borner | 2020-11-05 17:32:53 +0100 |
commit | 63e86f792167e6cc2e9600d00b184a3c83fe7498 (patch) | |
tree | 31e2d583be3ebf34782f6ec37f6c524657c40686 /kernel/drivers/ide.c | |
parent | 916fca2161e76de67a5106b90baf00a57f2a0512 (diff) |
Added warning flags and fixed them :)
Diffstat (limited to 'kernel/drivers/ide.c')
-rw-r--r-- | kernel/drivers/ide.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/drivers/ide.c b/kernel/drivers/ide.c index 1a94ae3..227dfe5 100644 --- a/kernel/drivers/ide.c +++ b/kernel/drivers/ide.c @@ -16,7 +16,7 @@ int ide_stat() void ide_wait() { - u8 stat = 0; + int stat = 0; do stat = ide_stat(); while ((stat & IDE_BUSY) != 0); @@ -25,10 +25,10 @@ void ide_wait() // TODO: Fix strange ide_read bugs void *ide_read(void *b, u32 block) { - int sector_count = BLOCK_SIZE / SECTOR_SIZE; // 2 - int sector = block * sector_count; + u8 sector_count = BLOCK_SIZE / SECTOR_SIZE; // 2 + u32 sector = block * sector_count; - outb(IDE_IO + IDE_SECTOR_COUNT, sector_count); // Number of sectors + outb(IDE_IO + IDE_SECTOR_COUNT, (u8)sector_count); // Number of sectors outb(IDE_IO + IDE_LOW, LBA_LOW(sector)); outb(IDE_IO + IDE_MID, LBA_MID(sector)); |