- char *filepath;
- char *conf_file;
- char *tmpstr;
- ssize_t conf_len;
- int fd;
- struct stat st;
- char *label;
-
- devpath = strdup(device);
-
- filepath = resolve_path("/etc/yaboot.conf", devpath);
-
- fd = open(filepath, O_RDONLY);
- if (fd < 0) {
- free(filepath);
- filepath = resolve_path("/yaboot.conf", devpath);
- fd = open(filepath, O_RDONLY);
-
- if (fd < 0)
- return 0;
- }
-
- if (fstat(fd, &st)) {
- close(fd);
- return 0;
+ struct yaboot_state *state = conf->parser_info;
+ struct discover_boot_option *opt = state->opt;
+ struct fixed_pair {
+ const char *image;
+ const char *initrd;
+ };
+ static const struct fixed_pair suse_fp32 = {
+ .image = "/suseboot/vmlinux32",
+ .initrd = "/suseboot/initrd32",
+ };
+ static const struct fixed_pair suse_fp64 = {
+ .image = "/suseboot/vmlinux64",
+ .initrd = "/suseboot/initrd64",
+ };
+ const struct fixed_pair *suse_fp;
+
+ /* fixup for bare values */
+
+ if (!name)
+ name = value;
+
+ if (!state->globals_done && conf_set_global_option(conf, name, value))
+ return;
+
+ if (!conf_param_in_list(state->known_names, name))
+ return;
+
+ state->globals_done = 1;
+
+ /* image */
+
+ if (streq(name, "image")) {
+
+ /* First finish any previous image. */
+ if (opt)
+ yaboot_finish(conf);
+
+ /* Then start the new image. */
+ opt = state_start_new_option(conf, state);
+
+ state->boot_image = talloc_strdup(state, value);
+
+ return;