Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src
On Fri, May 02, 2008 at 05:25:46PM +0100, Stephen Borrill wrote:
> Problem here is that we can't use boot.cfg to select different modules
> easily. How about this something like this (untested) patch?
>
> --- boot2.c 2 May 2008 15:26:38 -0000 1.25
> +++ boot2.c 2 May 2008 16:19:06 -0000
> @@ -463,7 +463,7 @@
> doboottypemenu(void)
> {
> int choice;
> - char input[80], c;
> + char input[80], c, *ic, *oc;
>
> printf("\n");
> /* Display menu */
> @@ -508,8 +508,17 @@
> check_password(boot_params.bp_password))) {
> printf("type \"?\" or \"help\" for help.\n");
> bootmenu(); /* does not return */
> - } else
> - docommand(bootconf.command[choice]);
> + } else {
> + ic = bootconf.command[choice];
> + /* Split command string at ; into separate
> commands */
> + do {
> + oc = input;
> + for (; *ic && *ic != ';'; ic++)
> + *oc++ = *ic;
> + *oc = '\0';
> + if (*ic == ';') ic++;
> + docommand(input);
> + } while (*ic);
> + }
>
> }
> }
>
>
> You could then use something like:
> menu=Boot with module foo:load=/foo.kmod;boot
> menu=Boot with module bar:load=/bar.kmod;boot
> menu=Boot with modules foo and bar:load=/foo.kmod;load=/bar.kmod;boot
>
> If you think is OK, I'll tidy it up, update the man page and commit.
I think it's a good idea.
Thanks,
Andrew
Home |
Main Index |
Thread Index |
Old Index