summaryrefslogtreecommitdiffhomepage
path: root/src/loader/dsk.c
blob: 5e8fc3ded8cf64c312d3bb6ec0d1caa305b6851a (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 <dsk.h>
#include <fs/ext2.h>
#include <log.h>
#include <mbr.h>
#include <pnc.h>

void dsk_detect(struct dev *dev)
{
	assert(dev->type == DEV_DISK);

	if (mbr_detect(dev))
		return;

	if (ext2_detect(dev))
		return;

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