- const char *g_boot = conf_get_global_option(conf, "boot");
- const char *g_part = conf_get_global_option(conf, "partition");
-
- if (g_boot && g_part) {
- char* dev = talloc_asprintf(NULL, "%s%s", g_boot,
- g_part);
-
- opt->initrd_file = resolve_path(opt,
- value, dev);
- state->desc_initrd = talloc_asprintf(state,
- "initrd=%s%s", dev, value);
- talloc_free(dev);
- } else if (g_boot) {
- opt->initrd_file = resolve_path(opt,
- value, g_boot);
- state->desc_initrd = talloc_asprintf(state,
- "initrd=%s%s", g_boot, value);
- } else {
- opt->initrd_file = resolve_path(opt,
- value, conf->dc->device->device_path);
- state->desc_initrd = talloc_asprintf(state, "initrd=%s",
- value);
- }
+ opt->initrd = create_yaboot_devpath_resource(conf,
+ value, &state->desc_image);
+