In preparation of moving file handling to the discover core (rather than
the parsers), include the conf file names in struct parser.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
-define_parser(grub2, grub2_parse);
+struct parser __grub2_parser = {
+ .name = "grub2",
+ .parse = grub2_parse,
+ .filenames = grub2_conf_files,
+};
-define_parser(kboot, kboot_parse);
+struct parser __kboot_parser = {
+ .name = "kboot",
+ .parse = kboot_parse,
+ .filenames = kboot_conf_files,
+};
struct discover_context;
struct parser {
struct discover_context;
struct parser {
- char *name;
- int (*parse)(struct discover_context *ctx);
+ char *name;
+ const char * const *filenames;
+ int (*parse)(struct discover_context *ctx);
};
enum generic_icon_type {
};
enum generic_icon_type {
-define_parser(yaboot, yaboot_parse);
+struct parser __yaboot_parser = {
+ .name = "yaboot",
+ .parse = yaboot_parse,
+ .filenames = yaboot_conf_files,
+};