fix two bugs in the command setkey and start.S.
This commit is contained in:
parent
aa7121490f
commit
14b7a703a9
4 changed files with 37 additions and 18 deletions
14
ChangeLog
14
ChangeLog
|
@ -1,3 +1,17 @@
|
|||
2000-10-10 OKUJI Yoshinori <okuji@gnu.org>
|
||||
|
||||
* stage2/start.S (copy_buffer): Use pusha and popa instead of
|
||||
pushing and poping %di and %si individually, to reduce the code
|
||||
size and save %cx as well. Reported by Herbert Nachtnebel
|
||||
<nachtneb@iaee.tuwien.ac.at>.
|
||||
|
||||
2000-10-10 OKUJI Yoshinori <okuji@gnu.org>
|
||||
|
||||
From Daniel Pittman <daniel@rimspace.net>:
|
||||
* stage2/builtins.c (setkey_func): Check if
|
||||
KEYSYM_TABLE[I].UNSHIFTED_NAME and KEYSYM_TABLE[I].SHIFTED_NAME
|
||||
are not NULLs, before calling grub_strcmp.
|
||||
|
||||
2000-10-08 OKUJI Yoshinori <okuji@gnu.org>
|
||||
|
||||
* util/grub-install.in (grub_prefix): New variable. The default
|
||||
|
|
2
THANKS
2
THANKS
|
@ -15,6 +15,7 @@ Bryan Ford <baford@cs.utah.edu>
|
|||
Chip Salzenberg <chip@valinux.com>
|
||||
Christoph Plattner <Christoph.Plattner@dot.at>
|
||||
Dan J. Walters <djw@cs.utexas.edu>
|
||||
Daniel Pittman <daniel@rimspace.net>
|
||||
Daniel Wagner <wagi@gmx.ch>
|
||||
Edmund GRIMLEY EVANS <edmundo@rano.demon.co.uk>
|
||||
Edward Killips <ekillips@triton.net>
|
||||
|
@ -23,6 +24,7 @@ Frank Mehnert <fm3@os.inf.tu-dresden.de>
|
|||
Goran Koruga <goran.koruga@hermes.si>
|
||||
Hal Snyder <hal@vailsys.com>
|
||||
Heiko Schroeder <heiko@pool.informatik.rwth-aachen.de>
|
||||
Herbert Nachtnebel <nachtneb@iaee.tuwien.ac.at>
|
||||
Hisazumi Kenji <nel@soraneko.com>
|
||||
Jochen Hoenicke <jochen@gnu.org>
|
||||
Johannes Kroeger <hanne@squirrel.owl.de>
|
||||
|
|
|
@ -3182,9 +3182,11 @@ setkey_func (char *arg, int flags)
|
|||
|
||||
for (i = 0; i < sizeof (keysym_table) / sizeof (keysym_table[0]); i++)
|
||||
{
|
||||
if (grub_strcmp (key, keysym_table[i].unshifted_name) == 0)
|
||||
if (keysym_table[i].unshifted_name &&
|
||||
grub_strcmp (key, keysym_table[i].unshifted_name) == 0)
|
||||
return keysym_table[i].keycode;
|
||||
else if (grub_strcmp (key, keysym_table[i].shifted_name) == 0)
|
||||
else if (keysym_table[i].shifted_name &&
|
||||
grub_strcmp (key, keysym_table[i].shifted_name) == 0)
|
||||
return keysym_table[i].keycode;
|
||||
}
|
||||
|
||||
|
@ -3197,9 +3199,11 @@ setkey_func (char *arg, int flags)
|
|||
|
||||
for (i = 0; i < sizeof (keysym_table) / sizeof (keysym_table[0]); i++)
|
||||
{
|
||||
if (grub_strcmp (key, keysym_table[i].unshifted_name) == 0)
|
||||
if (keysym_table[i].unshifted_name &&
|
||||
grub_strcmp (key, keysym_table[i].unshifted_name) == 0)
|
||||
return keysym_table[i].unshifted_ascii;
|
||||
else if (grub_strcmp (key, keysym_table[i].shifted_name) == 0)
|
||||
else if (keysym_table[i].shifted_name &&
|
||||
grub_strcmp (key, keysym_table[i].shifted_name) == 0)
|
||||
return keysym_table[i].shifted_ascii;
|
||||
}
|
||||
|
||||
|
@ -3249,7 +3253,8 @@ setkey_func (char *arg, int flags)
|
|||
|
||||
if (to_code == from_code)
|
||||
/* If TO is equal to FROM, delete the entry. */
|
||||
grub_memmove ((char *) &bios_key_map[i], (char *) &bios_key_map[i + 1],
|
||||
grub_memmove ((char *) &bios_key_map[i],
|
||||
(char *) &bios_key_map[i + 1],
|
||||
sizeof (unsigned short) * (KEY_MAP_SIZE - i));
|
||||
else
|
||||
bios_key_map[i] = (to_code << 8) | from_code;
|
||||
|
|
|
@ -279,15 +279,14 @@ copy_buffer:
|
|||
addw %ax, 6(%di) /* add the corrected value to the destination
|
||||
address for next time */
|
||||
|
||||
/* save addressing regs */
|
||||
pusha
|
||||
pushw %ds
|
||||
|
||||
/* get the copy length */
|
||||
shlw $4, %ax
|
||||
movw %ax, %cx
|
||||
|
||||
/* save addressing regs */
|
||||
pushw %si
|
||||
pushw %di
|
||||
pushw %ds
|
||||
|
||||
xorw %di, %di /* zero offset of destination addresses */
|
||||
xorw %si, %si /* zero offset of source addresses */
|
||||
movw %bx, %ds /* restore the source segment */
|
||||
|
@ -302,8 +301,7 @@ copy_buffer:
|
|||
(MSG modifies SI, which is saved, and unused AX and BX) */
|
||||
popw %ds
|
||||
MSG(notification_step)
|
||||
popw %di
|
||||
popw %si
|
||||
popa
|
||||
|
||||
/* check if finished with this dataset */
|
||||
cmpw $0, 4(%di)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue