fix a bug in partition search.
This commit is contained in:
parent
9f3e0b8ec5
commit
5343bda835
4 changed files with 83 additions and 2 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
1999-11-30 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
|
||||||
|
|
||||||
|
* stage2/disk_io.c (real_open_partition): If SLICE_NO is greater
|
||||||
|
than or equal to PC_SLICE_MAX, skip any extended partition, when
|
||||||
|
searching for the right partition. Reported by Weil, Stefan 3732
|
||||||
|
EPE-24 <Stefan.Weil@de.heidelberg.com>.
|
||||||
|
|
||||||
1999-11-19 Gordon Matzigkeit <gord@fig.org>
|
1999-11-19 Gordon Matzigkeit <gord@fig.org>
|
||||||
|
|
||||||
* grub/asmstub.c (getkey): Stop immediately if we get an EOF.
|
* grub/asmstub.c (getkey): Stop immediately if we get an EOF.
|
||||||
|
|
72
TODO
72
TODO
|
@ -32,6 +32,78 @@ Priorities:
|
||||||
|
|
||||||
* Complete the netboot support. !
|
* Complete the netboot support. !
|
||||||
|
|
||||||
|
This is the proposed interface between the netboot module and the core
|
||||||
|
system:
|
||||||
|
|
||||||
|
- The module contains a header like this:
|
||||||
|
|
||||||
|
struct netboot_module_header
|
||||||
|
{
|
||||||
|
/* The same as the Multiboot header, but has a different magic. */
|
||||||
|
struct multiboot_header mb_header;
|
||||||
|
/* The version number to avoid incompatibilities. */
|
||||||
|
unsigned short compat_version;
|
||||||
|
/* The identifier (should be "netboot" with NUL-terminated). */
|
||||||
|
char identifier[14];
|
||||||
|
/* some pointers to callback functions. */
|
||||||
|
unsigned long init_func;
|
||||||
|
unsigned long fini_func;
|
||||||
|
unsigned long mount_func;
|
||||||
|
unsinged long read_func;
|
||||||
|
unsinged long dir_func;
|
||||||
|
unsinged long close_func;
|
||||||
|
/* The address of the message buffer. The module should not print
|
||||||
|
anything on the screen directly. */
|
||||||
|
unsinged long msg_addr;
|
||||||
|
/* The maximum size of the message buffer (perhaps should be less
|
||||||
|
than 80*24, because of the screen size). */
|
||||||
|
unsinged long msg_size;
|
||||||
|
}
|
||||||
|
|
||||||
|
- When the core system loads the module, check for the header
|
||||||
|
structure and store the image in the specified memory address (in
|
||||||
|
the ELF header or in MB_HEADER). If successful, call INIT_FUNC.
|
||||||
|
|
||||||
|
- INIT_FUNC should initialize the module and return the required
|
||||||
|
memory space. The prototype is:
|
||||||
|
|
||||||
|
grub_error_t init_func (const struct multiboot_info *mbi,
|
||||||
|
unsigned long *mem_start,
|
||||||
|
unsigned long *mem_end);
|
||||||
|
|
||||||
|
If the module does not need any extra memory space, then set
|
||||||
|
*MEM_START to _START and *MEM_END to _END. MBI->CMDLINE has the
|
||||||
|
command-line argument specified (probably netmask=... or something).
|
||||||
|
|
||||||
|
FIXME: Should the module return most of the information dynamically
|
||||||
|
from INIT_FUNC, instead of the module header?
|
||||||
|
|
||||||
|
- When the core system unloads the module, call FINI_FUNC to restore
|
||||||
|
the resources cleanly.
|
||||||
|
|
||||||
|
- The prototype of FINI_FUNC is:
|
||||||
|
|
||||||
|
grub_error_t fini_func (const struct multiboot_info *mbi);
|
||||||
|
|
||||||
|
- The rest of the callback functions are equivalent to the filesystem
|
||||||
|
callbacks. Their prototypes are:
|
||||||
|
|
||||||
|
grub_error_t mount_func (const struct multiboot_info *mbi);
|
||||||
|
grub_error_t dir_func (const struct multiboot_info *mbi,
|
||||||
|
const char *filename);
|
||||||
|
grub_error_t read_func (const struct multiboot_info *mbi,
|
||||||
|
char *buffer, int len);
|
||||||
|
grub_error_t close_func (const struct multiboot_info *mbi);
|
||||||
|
|
||||||
|
FIXME: How to add decompression support?
|
||||||
|
|
||||||
|
- The core system will print the string MSG_ADDR after each call is
|
||||||
|
finished.
|
||||||
|
|
||||||
|
- Each callback function will be run in the exactly same condition as
|
||||||
|
when a Multiboot kernel starts up, and it MUST restore the condition
|
||||||
|
before it returns (i.e. PIC or IDT).
|
||||||
|
|
||||||
* Add automatic configuration support.
|
* Add automatic configuration support.
|
||||||
|
|
||||||
* Add bunzip2 support.
|
* Add bunzip2 support.
|
||||||
|
|
|
@ -574,6 +574,8 @@ real_open_partition (int flags)
|
||||||
* If we've found the right partition, we're done
|
* If we've found the right partition, we're done
|
||||||
*/
|
*/
|
||||||
if (! flags
|
if (! flags
|
||||||
|
&& (slice_no < PC_SLICE_MAX
|
||||||
|
|| ! IS_PC_SLICE_TYPE_EXTENDED (current_slice))
|
||||||
&& (part_no == slice_no
|
&& (part_no == slice_no
|
||||||
|| (part_no == 0xFF
|
|| (part_no == 0xFF
|
||||||
&& IS_PC_SLICE_TYPE_BSD (current_slice))))
|
&& IS_PC_SLICE_TYPE_BSD (current_slice))))
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* GRUB -- GRand Unified Bootloader
|
* GRUB -- GRand Unified Bootloader
|
||||||
* Copyright (C) 1996 Erich Boleyn <erich@uruk.org>
|
* Copyright (C) 1996 Erich Boleyn <erich@uruk.org>
|
||||||
|
* Copyright (C) 1999 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
|
||||||
|
@ -122,7 +122,7 @@
|
||||||
(((type) == PC_SLICE_TYPE_EXTENDED) \
|
(((type) == PC_SLICE_TYPE_EXTENDED) \
|
||||||
|| ((type) == PC_SLICE_TYPE_WIN95_EXTENDED))
|
|| ((type) == PC_SLICE_TYPE_WIN95_EXTENDED))
|
||||||
|
|
||||||
/* these ones are special, as they use thier own partitioning scheme
|
/* these ones are special, as they use their own partitioning scheme
|
||||||
to subdivide the PC partitions from there. */
|
to subdivide the PC partitions from there. */
|
||||||
#define PC_SLICE_TYPE_FREEBSD 0xa5
|
#define PC_SLICE_TYPE_FREEBSD 0xa5
|
||||||
#define PC_SLICE_TYPE_OPENBSD 0xa6
|
#define PC_SLICE_TYPE_OPENBSD 0xa6
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue