X-Git-Url: http://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=devices%2Fkboot-parser.c;h=b70d5fca82b1290efba3f44550dc95d0ace1c582;hp=d449ef673e4b5c8d4cc218e79d9dd619a1257373;hb=7d7c328016aca3e14aee6268a2e7881d3440e226;hpb=c24a319cec4c563845ddfe269ed7f2d9b962d922 diff --git a/devices/kboot-parser.c b/devices/kboot-parser.c index d449ef6..b70d5fc 100644 --- a/devices/kboot-parser.c +++ b/devices/kboot-parser.c @@ -138,13 +138,13 @@ static int parse_option(struct boot_option *opt, char *config) /* if there's no space, it's only a kernel image with no params */ if (!pos) { - opt->boot_image_file = join_paths(mountpoint, config); + opt->boot_image_file = resolve_path(config, mountpoint); opt->description = strdup(config); return 1; } *pos = 0; - opt->boot_image_file = join_paths(mountpoint, config); + opt->boot_image_file = resolve_path(config, mountpoint); cmdline = malloc(buf_size); *cmdline = 0; @@ -179,7 +179,7 @@ static int parse_option(struct boot_option *opt, char *config) free(cmdline); cmdline = tmp; - opt->initrd_file = join_paths(mountpoint, initrd); + opt->initrd_file = resolve_path(initrd, mountpoint); } if (root) { @@ -197,7 +197,8 @@ static int parse_option(struct boot_option *opt, char *config) pb_log("kboot cmdline: %s\n", cmdline); opt->boot_args = cmdline; - asprintf(&opt->description, "%s %s", config, cmdline); + asprintf(&opt->description, "%s %s", + config, opt->boot_args); return 1; }