* grub/main.c (main): Make sure the boot drive number doesn't
exceed 255.
This commit is contained in:
parent
8e68069b48
commit
b8aa16f505
2 changed files with 12 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2006-05-02 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* grub/main.c (main): Make sure the boot drive number doesn't
|
||||
exceed 255.
|
||||
|
||||
2006-05-02 Vesa Jaaskelainen <chaac@nic.fi>
|
||||
|
||||
* stage2/shared.h (vbe_mode): Back ported aligment fix from GRUB 2
|
||||
|
|
|
@ -32,6 +32,7 @@ int grub_stage2 (void);
|
|||
#define WITHOUT_LIBC_STUBS 1
|
||||
#include <shared.h>
|
||||
#include <term.h>
|
||||
#include <device.h>
|
||||
|
||||
char *program_name = 0;
|
||||
int use_config_file = 1;
|
||||
|
@ -192,6 +193,12 @@ main (int argc, char **argv)
|
|||
perror ("strtoul");
|
||||
exit (1);
|
||||
}
|
||||
if (boot_drive >= NUM_DISKS)
|
||||
{
|
||||
fprintf (stderr, "boot_drive should be from 0 to %d\n",
|
||||
NUM_DISKS - 1);
|
||||
exit (1);
|
||||
}
|
||||
break;
|
||||
|
||||
case OPT_NO_CONFIG_FILE:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue