X-Git-Url: http://git.ozlabs.org/?p=yaboot.git;a=blobdiff_plain;f=second%2Fyaboot.c;h=0fd26a106af36d2599019ebb9289aa1ba150bc5b;hp=b7b9280b7577dc7ea8606ade10f002c64bc5d0fb;hb=37d30b56405bf9858e0c1c1baad93105737e7a1b;hpb=b5f28817d6d68c2cb2a3e5eaefe4633b085557b6 diff --git a/second/yaboot.c b/second/yaboot.c index b7b9280..0fd26a1 100644 --- a/second/yaboot.c +++ b/second/yaboot.c @@ -603,7 +603,7 @@ void check_password(char *str) prom_printf ("\n"); #ifdef USE_MD5_PASSWORDS if (!strncmp (password, "$1$", 3)) { - if (!check_md5_password(passwdbuff, password)) + if (!check_md5_password((unsigned char*)passwdbuff, (unsigned char*)password)) return; } else if (!strcmp (password, passwdbuff)) @@ -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;