summaryrefslogtreecommitdiffhomepage
path: root/src/loader/disk.c
blob: 42ec7729406e6c3492e900d9b3a0e582abd47f9e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// MIT License, Copyright (c) 2021 Marvin Borner

#include <disk.h>
#include <fs/ext2.h>
#include <log.h>
#include <mbr.h>
#include <panic.h>

void disk_detect(struct dev *dev)
{
	assert(dev->type == DEVICE_DISK);

	if (mbr_detect(dev))
		return;

	if (ext2_detect(dev))
		return;

	log("[DSK] Couldn't detect type of disk %s\n", dev->name);
}