summaryrefslogtreecommitdiff
path: root/block/partitions/blockconsole.c
blob: 79796a8799e927e2fb91cfde09ea3957874428ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <linux/blockconsole.h>

#include "check.h"

int blockconsole_partition(struct parsed_partitions *state)
{
	Sector sect;
	void *data;
	int err = 0;

	data = read_part_sector(state, 0, &sect);
	if (!data)
		return -EIO;
	if (!bcon_magic_present(data))
		goto out;

	bcon_add(state->name);
	err = 1;
out:
	put_dev_sector(sect);
	return err;
}