aboutsummaryrefslogtreecommitdiff
path: root/kernel/drivers/ide.c
diff options
context:
space:
mode:
authorMarvin Borner2021-02-14 17:07:29 +0100
committerMarvin Borner2021-02-14 17:07:29 +0100
commit1287f9dfe987f0456e4fb0741385d5f0278ef53b (patch)
tree64d3da484a4d186a725779f20d339432d51f441a /kernel/drivers/ide.c
parentbc4e62f629a392e1a4cf204665e91c57f4e619b2 (diff)
Message waiting and more!
Diffstat (limited to 'kernel/drivers/ide.c')
-rw-r--r--kernel/drivers/ide.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/drivers/ide.c b/kernel/drivers/ide.c
index 8fc90c9..9be7956 100644
--- a/kernel/drivers/ide.c
+++ b/kernel/drivers/ide.c
@@ -126,7 +126,7 @@ void ata_probe(void)
if (!ide_find(bus, drive))
continue;
- struct device *dev = malloc(sizeof(*dev));
+ struct device *dev = zalloc(sizeof(*dev));
struct ata_data *data = malloc(sizeof(*data));
data->drive = (bus << 1) | drive;
@@ -144,7 +144,7 @@ void ata_probe(void)
continue;
// TODO: Check if ext2 first
- struct vfs *vfs = malloc(sizeof(*vfs));
+ struct vfs *vfs = zalloc(sizeof(*vfs));
vfs->type = VFS_EXT2;
vfs->read = ext2_read;
vfs->stat = ext2_stat;
@@ -158,6 +158,6 @@ void ata_probe(void)
void ata_install(void)
{
- ide_buf = malloc(SECTOR_SIZE);
+ ide_buf = zalloc(SECTOR_SIZE);
ata_probe();
}