aboutsummaryrefslogtreecommitdiff
path: root/kernel/drivers/ide.c
diff options
context:
space:
mode:
authorMarvin Borner2021-02-07 00:54:21 +0100
committerMarvin Borner2021-02-07 00:54:21 +0100
commite5086811a048120d51add9bff9ba7a669fb582f5 (patch)
tree8ccf3b193df5213548fc36c88ab83ac99d5e8654 /kernel/drivers/ide.c
parent6944f48d30a581d437bc2c8f873a499291412bb7 (diff)
Fixed some memory leaks (broke some stuff too)
Diffstat (limited to 'kernel/drivers/ide.c')
-rw-r--r--kernel/drivers/ide.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/drivers/ide.c b/kernel/drivers/ide.c
index 5a51cb8..7dd2416 100644
--- a/kernel/drivers/ide.c
+++ b/kernel/drivers/ide.c
@@ -106,7 +106,7 @@ u8 ata_read_one(u8 *buf, u32 lba, struct device *dev)
return 1;
}
-u32 ata_read(void *buf, u32 lba, u32 sector_count, struct device *dev)
+s32 ata_read(void *buf, u32 lba, u32 sector_count, struct device *dev)
{
u8 *b = buf; // I love bytes, yk
for (u32 i = 0; i < sector_count; i++) {
@@ -150,6 +150,7 @@ void ata_probe(void)
vfs->ready = ext2_ready;
vfs->stat = ext2_stat;
dev->vfs = vfs;
+ dev->data = data;
vfs_mount(dev, "/");
}
}