Better management of chainloader

This commit is contained in:
Laurent Vivier 2008-02-10 01:36:39 +00:00
parent d4719723dc
commit 1ff43d1924

View File

@ -518,7 +518,7 @@ static int8_t *set_config(emile_config *config, int drive)
ret = emile_scsi_create_container(fd, ret = emile_scsi_create_container(fd,
&unit_id, &unit_id,
container, container,
1); 2);
close(fd); close(fd);
if (ret == -1) if (ret == -1)
{ {
@ -540,15 +540,14 @@ static int8_t *set_config(emile_config *config, int drive)
"block:(sd%d)0x%x,0x%x", unit_id, "block:(sd%d)0x%x,0x%x", unit_id,
container->blocks[0].offset, container->blocks[0].offset,
container->blocks[0].count); container->blocks[0].count);
free(container); free(container);
config_set_indexed_property(configuration, config_set_indexed_property(configuration,
"title", title, "title", title,
"chainloader", chainloader); "chainloader", chainloader);
free(chainloader); free(chainloader);
} }
} }
else if (!emile_config_get(config, CONFIG_KERNEL, &kernel_path))
if (!emile_config_get(config, CONFIG_KERNEL, &kernel_path))
{ {
ret = emile_config_get(config, CONFIG_KERNEL_MAP, ret = emile_config_get(config, CONFIG_KERNEL_MAP,
&kernel_map_path); &kernel_map_path);