X-Git-Url: http://git.ozlabs.org/?p=yaboot.git;a=blobdiff_plain;f=second%2Fyaboot.c;h=1f3f1518845aa67b0a81847f226a775a2ea9c34d;hp=b7b9280b7577dc7ea8606ade10f002c64bc5d0fb;hb=94adb3aee138118174e34f519ff6ce3e8ece707c;hpb=b5f28817d6d68c2cb2a3e5eaefe4633b085557b6 diff --git a/second/yaboot.c b/second/yaboot.c index b7b9280..1f3f151 100644 --- a/second/yaboot.c +++ b/second/yaboot.c @@ -709,9 +709,10 @@ int get_params(struct boot_param_t* params) if (!imagename) { if (bootoncelabel[0] != 0) imagename = bootoncelabel; - else if (bootlastlabel[0] != 0) - imagename = bootlastlabel; - else + else if (bootlastlabel[0] != 0) { + imagename = bootlastlabel; + word_split(&imagename, ¶ms->args); + } else imagename = cfg_get_default(); } if (imagename) @@ -773,7 +774,13 @@ int get_params(struct boot_param_t* params) imagename = cfg_get_default(); /* write the imagename out so it can be reused on reboot if necessary */ - prom_set_options("boot-last-label", imagename, strlen(imagename)); + strcpy(bootlastlabel, imagename); + if (params->args && params->args[0]) { + strcat(bootlastlabel, " "); + strcat(bootlastlabel, params->args); + } + prom_set_options("boot-last-label", bootlastlabel, + strlen(bootlastlabel) + 1); label = 0; defdevice = boot.dev;