rewrite the command find, update TODO.
This commit is contained in:
parent
b3ccacd20f
commit
69e36bc547
3 changed files with 79 additions and 43 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
||||||
|
2000-09-29 OKUJI Yoshinori <okuji@gnu.org>
|
||||||
|
|
||||||
|
* stage2/builtins.c (find_func): New variable GOT_FILE is set to
|
||||||
|
one if FILENAME is found. Otherwise, it is set to zero.
|
||||||
|
Clear ERRNUM at the end in the loop for floppies, to ensure that
|
||||||
|
ERRNUM is cleared before examining hard disks.
|
||||||
|
Rewrite the loop for hard disks using next_partitions, so this
|
||||||
|
function now checks all partitions you have certainly.
|
||||||
|
If GOT_FILE is non-zero, set ERRNUM to ERR_FILE_NOT_FOUND and
|
||||||
|
return one.
|
||||||
|
|
||||||
2000-09-29 OKUJI Yoshinori <okuji@gnu.org>
|
2000-09-29 OKUJI Yoshinori <okuji@gnu.org>
|
||||||
|
|
||||||
* stage2/disk_io.c (check_BSD_parts): Removed.
|
* stage2/disk_io.c (check_BSD_parts): Removed.
|
||||||
|
|
26
TODO
26
TODO
|
@ -16,9 +16,19 @@ Priorities:
|
||||||
* Port the script ``grub-install'' to FreeBSD, NetBSD and OpenBSD. At
|
* Port the script ``grub-install'' to FreeBSD, NetBSD and OpenBSD. At
|
||||||
least you will have to modify the function `convert' so that it can
|
least you will have to modify the function `convert' so that it can
|
||||||
translate a native device name into the corresponding GRUB drive
|
translate a native device name into the corresponding GRUB drive
|
||||||
representation.
|
representation. !
|
||||||
|
|
||||||
* Add configuration inclusion support by adding a command "include".
|
* Add configuration inclusion support by adding a command "include". !
|
||||||
|
|
||||||
|
* Add a command to run a GRUB script file. !!
|
||||||
|
|
||||||
|
* Finish the Multiboot Speicification 0.7. !!!
|
||||||
|
|
||||||
|
* Add commands to manipulate the menu from the command-line interface. !
|
||||||
|
|
||||||
|
* Add more --disable-FOO options to configure, so that you can create a
|
||||||
|
minimum GRUB image. This is useful for boot floppies because of the size
|
||||||
|
restriction. !
|
||||||
|
|
||||||
* Make symbolic links work for BSD FFS.
|
* Make symbolic links work for BSD FFS.
|
||||||
|
|
||||||
|
@ -44,15 +54,13 @@ Priorities:
|
||||||
|
|
||||||
* Add ISA PnP support.
|
* Add ISA PnP support.
|
||||||
|
|
||||||
* Fix the completion so that it works for BSD partitions as well. !
|
|
||||||
|
|
||||||
* Add BSD syntax support, using results of ioprobe to map drives. !
|
* Add BSD syntax support, using results of ioprobe to map drives. !
|
||||||
(0x1f0-0x1f7 = primary IDE, 0x170-0x176 = secondary,
|
(0x1f0-0x1f7 = primary IDE, 0x170-0x176 = secondary,
|
||||||
0x1e8-0x1ef = tertiary, 0x168-0x16f = quaternary).
|
0x1e8-0x1ef = tertiary, 0x168-0x16f = quaternary).
|
||||||
|
|
||||||
* Add more filesystems support (XFS, NTFS, etc.)
|
* Add more filesystems support (XFS, NTFS, etc.)
|
||||||
|
|
||||||
* Add remote console support (parallel and net). !
|
* Add more remote console support (parallel and net).
|
||||||
|
|
||||||
* Add RAID support.
|
* Add RAID support.
|
||||||
|
|
||||||
|
@ -72,3 +80,11 @@ Priorities:
|
||||||
BIOSes which have bootable-CDROM support (so you may use the "Bootable
|
BIOSes which have bootable-CDROM support (so you may use the "Bootable
|
||||||
CDROM" BIOS calls). It is not trivial to support BIOSes without the
|
CDROM" BIOS calls). It is not trivial to support BIOSes without the
|
||||||
capability to boot CDROM.
|
capability to boot CDROM.
|
||||||
|
|
||||||
|
? Divide pxegrub into two parts, so the initial image doesn't exceed
|
||||||
|
the 32KB limit. I'm not sure if this is really necessary, because the
|
||||||
|
PXE standard just says that it is _recommended_ to improve the
|
||||||
|
modularity of a boot image. Obviously, this reason doesn't apply to
|
||||||
|
GRUB, as pxegrub is merely a secondary boot loader. So whether this
|
||||||
|
task should be done depends on if existing PXE ROMs support >32KB
|
||||||
|
images or not, after all.
|
||||||
|
|
|
@ -1028,76 +1028,85 @@ find_func (char *arg, int flags)
|
||||||
unsigned long drive;
|
unsigned long drive;
|
||||||
unsigned long tmp_drive = saved_drive;
|
unsigned long tmp_drive = saved_drive;
|
||||||
unsigned long tmp_partition = saved_partition;
|
unsigned long tmp_partition = saved_partition;
|
||||||
|
int got_file = 0;
|
||||||
|
|
||||||
/* Floppies. */
|
/* Floppies. */
|
||||||
for (drive = 0; drive < 8; drive++)
|
for (drive = 0; drive < 8; drive++)
|
||||||
{
|
{
|
||||||
errnum = ERR_NONE;
|
|
||||||
current_drive = drive;
|
current_drive = drive;
|
||||||
current_partition = 0xFFFFFF;
|
current_partition = 0xFFFFFF;
|
||||||
|
|
||||||
if (! open_device ())
|
if (open_device ())
|
||||||
continue;
|
|
||||||
|
|
||||||
saved_drive = current_drive;
|
|
||||||
saved_partition = current_partition;
|
|
||||||
if (grub_open (filename))
|
|
||||||
{
|
{
|
||||||
grub_close ();
|
saved_drive = current_drive;
|
||||||
grub_printf (" (fd%d)\n", drive);
|
saved_partition = current_partition;
|
||||||
|
if (grub_open (filename))
|
||||||
|
{
|
||||||
|
grub_close ();
|
||||||
|
grub_printf (" (fd%d)\n", drive);
|
||||||
|
got_file = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
errnum = ERR_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Hard disks. */
|
/* Hard disks. */
|
||||||
for (drive = 0x80; drive < 0x88; drive++)
|
for (drive = 0x80; drive < 0x88; drive++)
|
||||||
{
|
{
|
||||||
unsigned long slice;
|
unsigned long part = 0xFFFFFF;
|
||||||
|
unsigned long start, len, offset, ext_offset;
|
||||||
|
int type, entry;
|
||||||
|
char buf[SECTOR_SIZE];
|
||||||
|
|
||||||
current_drive = drive;
|
current_drive = drive;
|
||||||
/* FIXME: is what maximum number right? */
|
while (next_partition (drive, 0xFFFFFF, &part, &type,
|
||||||
for (slice = 0; slice < 12; slice++)
|
&start, &len, &offset, &entry,
|
||||||
|
&ext_offset, buf))
|
||||||
{
|
{
|
||||||
errnum = ERR_NONE;
|
if (type != PC_SLICE_TYPE_NONE
|
||||||
current_partition = (slice << 16) | 0xFFFF;
|
&& ! IS_PC_SLICE_TYPE_BSD (type)
|
||||||
if (open_device ())
|
&& ! IS_PC_SLICE_TYPE_EXTENDED (type))
|
||||||
{
|
{
|
||||||
errnum = ERR_NONE;
|
current_partition = part;
|
||||||
saved_drive = current_drive;
|
if (open_device ())
|
||||||
saved_partition = current_partition;
|
|
||||||
if (grub_open (filename))
|
|
||||||
{
|
{
|
||||||
grub_close ();
|
|
||||||
grub_printf (" (hd%d,%d)", drive - 0x80, slice);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (IS_PC_SLICE_TYPE_BSD (current_slice))
|
|
||||||
{
|
|
||||||
unsigned long part;
|
|
||||||
|
|
||||||
for (part = 0; part < 8; part++)
|
|
||||||
{
|
|
||||||
errnum = ERR_NONE;
|
|
||||||
current_partition = (slice << 16) | (part << 8) | 0xFF;
|
|
||||||
if (! open_device ())
|
|
||||||
continue;
|
|
||||||
|
|
||||||
saved_drive = current_drive;
|
saved_drive = current_drive;
|
||||||
saved_partition = current_partition;
|
saved_partition = current_partition;
|
||||||
if (grub_open (filename))
|
if (grub_open (filename))
|
||||||
{
|
{
|
||||||
|
int bsd_part = (part >> 8) & 0xFF;
|
||||||
|
int pc_slice = part >> 16;
|
||||||
|
|
||||||
grub_close ();
|
grub_close ();
|
||||||
grub_printf (" (hd%d,%d,%c)",
|
|
||||||
drive - 0x80, slice, part + 'a');
|
if (bsd_part == 0xFF)
|
||||||
|
grub_printf (" (hd%d,%d)\n",
|
||||||
|
drive - 0x80, pc_slice);
|
||||||
|
else
|
||||||
|
grub_printf (" (hd%d,%d,%c)\n",
|
||||||
|
drive - 0x80, pc_slice, bsd_part + 'a');
|
||||||
|
|
||||||
|
got_file = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
errnum = ERR_NONE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
errnum = ERR_NONE;
|
|
||||||
saved_drive = tmp_drive;
|
saved_drive = tmp_drive;
|
||||||
saved_partition = tmp_partition;
|
saved_partition = tmp_partition;
|
||||||
return 0;
|
|
||||||
|
if (got_file)
|
||||||
|
{
|
||||||
|
errnum = ERR_NONE;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
errnum = ERR_FILE_NOT_FOUND;
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct builtin builtin_find =
|
static struct builtin builtin_find =
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue