multiboot: Don't rely on particular ordering of options.
This commit is contained in:
parent
95ba04606f
commit
e0bd66c314
1 changed files with 18 additions and 11 deletions
|
@ -240,11 +240,16 @@ grub_cmd_multiboot (grub_command_t cmd __attribute__ ((unused)),
|
||||||
|
|
||||||
#ifndef GRUB_USE_MULTIBOOT2
|
#ifndef GRUB_USE_MULTIBOOT2
|
||||||
grub_multiboot_quirks = GRUB_MULTIBOOT_QUIRKS_NONE;
|
grub_multiboot_quirks = GRUB_MULTIBOOT_QUIRKS_NONE;
|
||||||
|
int option_found = 0;
|
||||||
|
|
||||||
|
do
|
||||||
|
{
|
||||||
|
option_found = 0;
|
||||||
if (argc != 0 && grub_strcmp (argv[0], "--quirk-bad-kludge") == 0)
|
if (argc != 0 && grub_strcmp (argv[0], "--quirk-bad-kludge") == 0)
|
||||||
{
|
{
|
||||||
argc--;
|
argc--;
|
||||||
argv++;
|
argv++;
|
||||||
|
option_found = 1;
|
||||||
grub_multiboot_quirks |= GRUB_MULTIBOOT_QUIRK_BAD_KLUDGE;
|
grub_multiboot_quirks |= GRUB_MULTIBOOT_QUIRK_BAD_KLUDGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -252,8 +257,10 @@ grub_cmd_multiboot (grub_command_t cmd __attribute__ ((unused)),
|
||||||
{
|
{
|
||||||
argc--;
|
argc--;
|
||||||
argv++;
|
argv++;
|
||||||
|
option_found = 1;
|
||||||
grub_multiboot_quirks |= GRUB_MULTIBOOT_QUIRK_MODULES_AFTER_KERNEL;
|
grub_multiboot_quirks |= GRUB_MULTIBOOT_QUIRK_MODULES_AFTER_KERNEL;
|
||||||
}
|
}
|
||||||
|
} while (option_found);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (argc == 0)
|
if (argc == 0)
|
||||||
|
|
Loading…
Reference in a new issue