From c44daf1cd40ba1aad9dfa00ce453589955f488a0 Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Sat, 28 Oct 2006 22:35:44 +0000 Subject: [PATCH] correctly set second level information --- tools/emile.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tools/emile.c b/tools/emile.c index 2e46b28..4223eb7 100644 --- a/tools/emile.c +++ b/tools/emile.c @@ -724,9 +724,17 @@ int main(int argc, char **argv) /* set second configuration */ ret = emile_first_get_param(fd, &drive, &second, &size); - if (ret != EEMILE_UNKNOWN_FIRST) - ret = emile_second_set_param(fd, map_info, - append_string, ramdisk_path); + if (ret == EEMILE_UNKNOWN_FIRST) + lseek(fd, 0, SEEK_SET); + ret = emile_second_set_param(fd, map_info, + append_string, ramdisk_path); + if (ret != 0) + { + fprintf(stderr, + "ERROR: cannot set \"%s\" information in \"%s\".\n", + kernel_path, map_path); + return 18; + } } close(fd);