fix serious bugs in embed_func and find_func.
This commit is contained in:
parent
f273c77790
commit
ee4e0d44b3
3 changed files with 19 additions and 7 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
||||||
|
1999-11-06 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
|
||||||
|
|
||||||
|
* grub/asmstub.c (grub_putchar) [HAVE_LIBCURSES]: Do not call
|
||||||
|
wrefresh. This was just an accident. Sorry.
|
||||||
|
|
||||||
|
Reported by Alan McLean <amcl@flash.net>:
|
||||||
|
* stage2/builtins.c (embed_func): The sector argument for the
|
||||||
|
function biosdisk is changed from SECTOR + I * SECTOR_SIZE to
|
||||||
|
SECTOR + I.
|
||||||
|
(find_func): Clear ERRNUM before each of the attempts.
|
||||||
|
|
||||||
1999-11-05 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
|
1999-11-05 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
|
||||||
|
|
||||||
* docs/multiboot.texi (Boot information format): Add the members
|
* docs/multiboot.texi (Boot information format): Add the members
|
||||||
|
|
|
@ -741,10 +741,7 @@ grub_putchar (int c)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_LIBCURSES
|
#ifdef HAVE_LIBCURSES
|
||||||
if (use_curses)
|
if (use_curses)
|
||||||
{
|
addch (c);
|
||||||
addch (c);
|
|
||||||
wrefresh (stdscr);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
putchar (c);
|
putchar (c);
|
||||||
|
|
|
@ -645,7 +645,7 @@ embed_func (char *arg, int flags)
|
||||||
grub_memmove ((char *) SCRATCHADDR, stage1_5_buffer + i * SECTOR_SIZE,
|
grub_memmove ((char *) SCRATCHADDR, stage1_5_buffer + i * SECTOR_SIZE,
|
||||||
SECTOR_SIZE);
|
SECTOR_SIZE);
|
||||||
if (biosdisk (BIOSDISK_WRITE, current_drive, &buf_geom,
|
if (biosdisk (BIOSDISK_WRITE, current_drive, &buf_geom,
|
||||||
sector + i * SECTOR_SIZE, 1, SCRATCHSEG))
|
sector + i, 1, SCRATCHSEG))
|
||||||
{
|
{
|
||||||
errnum = ERR_WRITE;
|
errnum = ERR_WRITE;
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -707,6 +707,7 @@ find_func (char *arg, int flags)
|
||||||
/* 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;
|
||||||
|
|
||||||
|
@ -726,11 +727,12 @@ find_func (char *arg, int flags)
|
||||||
for (drive = 0x80; drive < 0x88; drive++)
|
for (drive = 0x80; drive < 0x88; drive++)
|
||||||
{
|
{
|
||||||
unsigned long slice;
|
unsigned long slice;
|
||||||
|
|
||||||
current_drive = drive;
|
current_drive = drive;
|
||||||
/* FIXME: is what maximum number right? */
|
/* FIXME: is what maximum number right? */
|
||||||
for (slice = 0; slice < 12; slice++)
|
for (slice = 0; slice < 12; slice++)
|
||||||
{
|
{
|
||||||
|
errnum = ERR_NONE;
|
||||||
current_partition = (slice << 16) | 0xFFFF;
|
current_partition = (slice << 16) | 0xFFFF;
|
||||||
if (! open_device () && IS_PC_SLICE_TYPE_BSD (current_slice))
|
if (! open_device () && IS_PC_SLICE_TYPE_BSD (current_slice))
|
||||||
{
|
{
|
||||||
|
@ -738,6 +740,7 @@ find_func (char *arg, int flags)
|
||||||
|
|
||||||
for (part = 0; part < 8; part++)
|
for (part = 0; part < 8; part++)
|
||||||
{
|
{
|
||||||
|
errnum = ERR_NONE;
|
||||||
current_partition = (slice << 16) | (part << 8) | 0xFF;
|
current_partition = (slice << 16) | (part << 8) | 0xFF;
|
||||||
if (! open_device ())
|
if (! open_device ())
|
||||||
continue;
|
continue;
|
||||||
|
@ -754,6 +757,7 @@ find_func (char *arg, int flags)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
errnum = ERR_NONE;
|
||||||
saved_drive = current_drive;
|
saved_drive = current_drive;
|
||||||
saved_partition = current_partition;
|
saved_partition = current_partition;
|
||||||
if (grub_open (filename))
|
if (grub_open (filename))
|
||||||
|
@ -765,7 +769,7 @@ find_func (char *arg, int flags)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
errnum = 0;
|
errnum = ERR_NONE;
|
||||||
saved_drive = tmp_drive;
|
saved_drive = tmp_drive;
|
||||||
saved_partition = tmp_partition;
|
saved_partition = tmp_partition;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue