2003-10-19 Yoshinori OKUJI <okuji@enbug.org>
From KB Sriram <mail_kb@yahoo.com>: * stage2/disk_io.c (set_device) [SUPPORT_NETBOOT]: Added support for a completion of a network device. (print_completions): Likewise.
This commit is contained in:
parent
4db8e630b4
commit
e8911332da
4 changed files with 47 additions and 17 deletions
3
AUTHORS
3
AUTHORS
|
@ -45,3 +45,6 @@ Jason Thomas added Linux DAC960 support and support for hiding/unhiding
|
||||||
logical partitions, and did a significant bugfix for the terminal stuff.
|
logical partitions, and did a significant bugfix for the terminal stuff.
|
||||||
|
|
||||||
Tilmann Bubeck added support for vt100-incompatible terminals.
|
Tilmann Bubeck added support for vt100-incompatible terminals.
|
||||||
|
|
||||||
|
KB Sriram added a better detection of FAT filesystem and fixed a
|
||||||
|
network device completion.
|
||||||
|
|
|
@ -1,3 +1,10 @@
|
||||||
|
2003-10-19 Yoshinori OKUJI <okuji@enbug.org>
|
||||||
|
|
||||||
|
From KB Sriram <mail_kb@yahoo.com>:
|
||||||
|
* stage2/disk_io.c (set_device) [SUPPORT_NETBOOT]: Added support
|
||||||
|
for a completion of a network device.
|
||||||
|
(print_completions): Likewise.
|
||||||
|
|
||||||
2003-10-10 Robert Millan <robertmh@gnu.org>
|
2003-10-10 Robert Millan <robertmh@gnu.org>
|
||||||
|
|
||||||
* config.{guess,sub}: Update from official source (CVS).
|
* config.{guess,sub}: Update from official source (CVS).
|
||||||
|
|
2
THANKS
2
THANKS
|
@ -63,6 +63,7 @@ Julien Bordet <julien.bordet@int-evry.fr>
|
||||||
Julien Perrot <julien.perrot@iie.cnam.fr>
|
Julien Perrot <julien.perrot@iie.cnam.fr>
|
||||||
Kalle Olavi Niemitalo <tosi@ees2.oulu.fi>
|
Kalle Olavi Niemitalo <tosi@ees2.oulu.fi>
|
||||||
Karsten Scheibler <karsten.scheibler@student.uni-halle.de>
|
Karsten Scheibler <karsten.scheibler@student.uni-halle.de>
|
||||||
|
KB Sriram <mail_kb@yahoo.com>
|
||||||
Khimenko Victor <grub@khim.sch57.msk.ru>
|
Khimenko Victor <grub@khim.sch57.msk.ru>
|
||||||
Klaus Reichl <klaus.reichl@alcatel.at>
|
Klaus Reichl <klaus.reichl@alcatel.at>
|
||||||
Kristoffer Branemyr <ztion@swipnet.se>
|
Kristoffer Branemyr <ztion@swipnet.se>
|
||||||
|
@ -87,6 +88,7 @@ Per Lundberg <plundis@byggdok.se>
|
||||||
Peter Astrand <altic@lysator.liu.se>
|
Peter Astrand <altic@lysator.liu.se>
|
||||||
Ralf Medow <ralf.medow@t-online.de>
|
Ralf Medow <ralf.medow@t-online.de>
|
||||||
Ramon van Handel <vhandel@chem.vu.nl>
|
Ramon van Handel <vhandel@chem.vu.nl>
|
||||||
|
Robert Millan <robertmh@gnu.org>
|
||||||
Roderich Schupp <rsch@ExperTeam.de>
|
Roderich Schupp <rsch@ExperTeam.de>
|
||||||
Rogelio M. Serrano Jr. <rogelio@victorio.com>
|
Rogelio M. Serrano Jr. <rogelio@victorio.com>
|
||||||
Serguei Tzukanov <tzukanov@narod.ru>
|
Serguei Tzukanov <tzukanov@narod.ru>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/* disk_io.c - implement abstract BIOS disk input and output */
|
/* disk_io.c - implement abstract BIOS disk input and output */
|
||||||
/*
|
/*
|
||||||
* GRUB -- GRand Unified Bootloader
|
* GRUB -- GRand Unified Bootloader
|
||||||
* Copyright (C) 1999,2000,2001,2002 Free Software Foundation, Inc.
|
* Copyright (C) 1999,2000,2001,2002,2003 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -948,8 +948,12 @@ set_device (char *device)
|
||||||
if (*device != ',' && *device != ')')
|
if (*device != ',' && *device != ')')
|
||||||
{
|
{
|
||||||
char ch = *device;
|
char ch = *device;
|
||||||
|
#ifdef SUPPORT_NETBOOT
|
||||||
if (*device == 'f' || *device == 'h' || *device == 'n')
|
if (*device == 'f' || *device == 'h' ||
|
||||||
|
(*device == 'n' && network_ready))
|
||||||
|
#else
|
||||||
|
if (*device == 'f' || *device == 'h')
|
||||||
|
#endif /* SUPPORT_NETBOOT */
|
||||||
{
|
{
|
||||||
/* user has given '([fhn]', check for resp. add 'd' and
|
/* user has given '([fhn]', check for resp. add 'd' and
|
||||||
let disk_choice handle what disks we have */
|
let disk_choice handle what disks we have */
|
||||||
|
@ -964,13 +968,20 @@ set_device (char *device)
|
||||||
return device + 2;
|
return device + 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((*device == 'f' || *device == 'h' || *device == 'n')
|
#ifdef SUPPORT_NETBOOT
|
||||||
|
if ((*device == 'f' || *device == 'h' ||
|
||||||
|
(*device == 'n' && network_ready))
|
||||||
|
#else
|
||||||
|
if ((*device == 'f' || *device == 'h')
|
||||||
|
#endif /* SUPPORT_NETBOOT */
|
||||||
&& (device += 2, (*(device - 1) != 'd')))
|
&& (device += 2, (*(device - 1) != 'd')))
|
||||||
errnum = ERR_NUMBER_PARSING;
|
errnum = ERR_NUMBER_PARSING;
|
||||||
|
|
||||||
if (ch == 'n')
|
#ifdef SUPPORT_NETBOOT
|
||||||
|
if (ch == 'n' && network_ready)
|
||||||
current_drive = NETWORK_DRIVE;
|
current_drive = NETWORK_DRIVE;
|
||||||
else
|
else
|
||||||
|
#endif /* SUPPORT_NETBOOT */
|
||||||
{
|
{
|
||||||
safe_parse_maxint (&device, (int *) ¤t_drive);
|
safe_parse_maxint (&device, (int *) ¤t_drive);
|
||||||
|
|
||||||
|
@ -1326,26 +1337,33 @@ print_completions (int is_filename, int is_completion)
|
||||||
if (! is_completion)
|
if (! is_completion)
|
||||||
grub_printf (" Possible disks are: ");
|
grub_printf (" Possible disks are: ");
|
||||||
|
|
||||||
for (i = (ptr && (*(ptr-2) == 'h' && *(ptr-1) == 'd') ? 1 : 0);
|
#ifdef SUPPORT_NETBOOT
|
||||||
i < (ptr && (*(ptr-2) == 'f' && *(ptr-1) == 'd') ? 1 : 2);
|
if (!ptr || *(ptr-1) != 'd' || *(ptr-2) != 'n')
|
||||||
i++)
|
#endif /* SUPPORT_NETBOOT */
|
||||||
{
|
{
|
||||||
for (j = 0; j < 8; j++)
|
for (i = (ptr && (*(ptr-1) == 'd' && *(ptr-2) == 'h') ? 1:0);
|
||||||
|
i < (ptr && (*(ptr-1) == 'd' && *(ptr-2) == 'f') ? 1:2);
|
||||||
|
i++)
|
||||||
{
|
{
|
||||||
disk_no = (i * 0x80) + j;
|
for (j = 0; j < 8; j++)
|
||||||
if ((disk_choice || disk_no == current_drive)
|
|
||||||
&& ! get_diskinfo (disk_no, &geom))
|
|
||||||
{
|
{
|
||||||
char dev_name[8];
|
disk_no = (i * 0x80) + j;
|
||||||
|
if ((disk_choice || disk_no == current_drive)
|
||||||
|
&& ! get_diskinfo (disk_no, &geom))
|
||||||
|
{
|
||||||
|
char dev_name[8];
|
||||||
|
|
||||||
grub_sprintf (dev_name, "%cd%d", i ? 'h' : 'f', j);
|
grub_sprintf (dev_name, "%cd%d", i ? 'h':'f', j);
|
||||||
print_a_completion (dev_name);
|
print_a_completion (dev_name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# ifdef SUPPORT_NETBOOT
|
# ifdef SUPPORT_NETBOOT
|
||||||
if (network_ready)
|
if (network_ready &&
|
||||||
|
(disk_choice || NETWORK_DRIVE == current_drive) &&
|
||||||
|
(!ptr || *(ptr-1) == '(' ||
|
||||||
|
(*(ptr-1) == 'd' && *(ptr-2) == 'n')))
|
||||||
print_a_completion ("nd");
|
print_a_completion ("nd");
|
||||||
# endif /* SUPPORT_NETBOOT */
|
# endif /* SUPPORT_NETBOOT */
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue