blob: beaacccbdb1973e3ccb1ba0b3a1e570f4c87cc61 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
#include <stdlib.h>
#include "pb-protocol/pb-protocol.h"
#include <log/log.h>
#include "device-handler.h"
#include "parser.h"
#include "parser-utils.h"
struct parser __grub2_parser;
struct parser __kboot_parser;
struct parser __native_parser;
struct parser __yaboot_parser;
static const struct parser *const parsers[] = {
// &__native_parser,
&__kboot_parser,
&__grub2_parser,
&__yaboot_parser,
NULL
};
void iterate_parsers(struct discover_context *ctx)
{
int i;
unsigned int count = 0;
pb_log("trying parsers for %s\n", ctx->device_path);
for (i = 0; parsers[i]; i++) {
pb_log("\ttrying parser '%s'\n", parsers[i]->name);
count += parsers[i]->parse(ctx);
}
if (!count)
pb_log("\tno boot_options found\n");
}
void parser_init(void)
{
}
|