+
+static const char *yaboot_known_names[] = {
+ "append",
+ "image",
+ "image[64bit]", /* SUSE extension */
+ "image[32bit]", /* SUSE extension */
+ "initrd",
+ "initrd-size",
+ "label",
+ "literal",
+ "ramdisk",
+ "read-only",
+ "read-write",
+ "root",
+ NULL
+};
+
+static int yaboot_parse(struct discover_context *dc)
+{
+ struct conf_context *conf;
+ struct yaboot_state *state;
+ int rc;
+
+ conf = talloc_zero(dc, struct conf_context);
+
+ if (!conf)
+ return -1;
+
+ conf->dc = dc;
+ conf->global_options = yaboot_global_options,
+ conf->conf_files = yaboot_conf_files,
+ conf->process_pair = yaboot_process_pair;
+ conf->finish = yaboot_finish;
+ conf->parser_info = state = talloc_zero(conf, struct yaboot_state);
+
+ state->known_names = yaboot_known_names;
+
+ /* opt is persistent, so must be associated with device */
+
+ state->opt = talloc_zero(conf->dc->device, struct boot_option);
+ state->opt->boot_args = talloc_strdup(state->opt, "");
+
+ rc = conf_parse(conf);
+
+ talloc_free(conf);
+ return rc;
+}
+
+define_parser(yaboot, 99, yaboot_parse);