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>
|
2000-10-08 OKUJI Yoshinori <okuji@gnu.org>
|
||||||
|
|
||||||
* util/grub-install.in (grub_prefix): New variable. The default
|
* 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>
|
Chip Salzenberg <chip@valinux.com>
|
||||||
Christoph Plattner <Christoph.Plattner@dot.at>
|
Christoph Plattner <Christoph.Plattner@dot.at>
|
||||||
Dan J. Walters <djw@cs.utexas.edu>
|
Dan J. Walters <djw@cs.utexas.edu>
|
||||||
|
Daniel Pittman <daniel@rimspace.net>
|
||||||
Daniel Wagner <wagi@gmx.ch>
|
Daniel Wagner <wagi@gmx.ch>
|
||||||
Edmund GRIMLEY EVANS <edmundo@rano.demon.co.uk>
|
Edmund GRIMLEY EVANS <edmundo@rano.demon.co.uk>
|
||||||
Edward Killips <ekillips@triton.net>
|
Edward Killips <ekillips@triton.net>
|
||||||
|
@ -23,6 +24,7 @@ Frank Mehnert <fm3@os.inf.tu-dresden.de>
|
||||||
Goran Koruga <goran.koruga@hermes.si>
|
Goran Koruga <goran.koruga@hermes.si>
|
||||||
Hal Snyder <hal@vailsys.com>
|
Hal Snyder <hal@vailsys.com>
|
||||||
Heiko Schroeder <heiko@pool.informatik.rwth-aachen.de>
|
Heiko Schroeder <heiko@pool.informatik.rwth-aachen.de>
|
||||||
|
Herbert Nachtnebel <nachtneb@iaee.tuwien.ac.at>
|
||||||
Hisazumi Kenji <nel@soraneko.com>
|
Hisazumi Kenji <nel@soraneko.com>
|
||||||
Jochen Hoenicke <jochen@gnu.org>
|
Jochen Hoenicke <jochen@gnu.org>
|
||||||
Johannes Kroeger <hanne@squirrel.owl.de>
|
Johannes Kroeger <hanne@squirrel.owl.de>
|
||||||
|
|
|
@ -3182,24 +3182,28 @@ setkey_func (char *arg, int flags)
|
||||||
|
|
||||||
for (i = 0; i < sizeof (keysym_table) / sizeof (keysym_table[0]); i++)
|
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;
|
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;
|
return keysym_table[i].keycode;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int find_ascii_code (char *key)
|
static int find_ascii_code (char *key)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < sizeof (keysym_table) / sizeof (keysym_table[0]); i++)
|
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;
|
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;
|
return keysym_table[i].shifted_ascii;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3208,10 +3212,10 @@ setkey_func (char *arg, int flags)
|
||||||
|
|
||||||
to_key = arg;
|
to_key = arg;
|
||||||
from_key = skip_to (0, to_key);
|
from_key = skip_to (0, to_key);
|
||||||
|
|
||||||
nul_terminate (to_key);
|
nul_terminate (to_key);
|
||||||
nul_terminate (from_key);
|
nul_terminate (from_key);
|
||||||
|
|
||||||
to_code = find_ascii_code (to_key);
|
to_code = find_ascii_code (to_key);
|
||||||
from_code = find_ascii_code (from_key);
|
from_code = find_ascii_code (from_key);
|
||||||
if (! to_code || ! from_code)
|
if (! to_code || ! from_code)
|
||||||
|
@ -3225,7 +3229,7 @@ setkey_func (char *arg, int flags)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (map_in_interrupt)
|
if (map_in_interrupt)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
@ -3249,7 +3253,8 @@ setkey_func (char *arg, int flags)
|
||||||
|
|
||||||
if (to_code == from_code)
|
if (to_code == from_code)
|
||||||
/* If TO is equal to FROM, delete the entry. */
|
/* 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));
|
sizeof (unsigned short) * (KEY_MAP_SIZE - i));
|
||||||
else
|
else
|
||||||
bios_key_map[i] = (to_code << 8) | from_code;
|
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
|
addw %ax, 6(%di) /* add the corrected value to the destination
|
||||||
address for next time */
|
address for next time */
|
||||||
|
|
||||||
|
/* save addressing regs */
|
||||||
|
pusha
|
||||||
|
pushw %ds
|
||||||
|
|
||||||
/* get the copy length */
|
/* get the copy length */
|
||||||
shlw $4, %ax
|
shlw $4, %ax
|
||||||
movw %ax, %cx
|
movw %ax, %cx
|
||||||
|
|
||||||
/* save addressing regs */
|
|
||||||
pushw %si
|
|
||||||
pushw %di
|
|
||||||
pushw %ds
|
|
||||||
|
|
||||||
xorw %di, %di /* zero offset of destination addresses */
|
xorw %di, %di /* zero offset of destination addresses */
|
||||||
xorw %si, %si /* zero offset of source addresses */
|
xorw %si, %si /* zero offset of source addresses */
|
||||||
movw %bx, %ds /* restore the source segment */
|
movw %bx, %ds /* restore the source segment */
|
||||||
|
@ -302,8 +301,7 @@ copy_buffer:
|
||||||
(MSG modifies SI, which is saved, and unused AX and BX) */
|
(MSG modifies SI, which is saved, and unused AX and BX) */
|
||||||
popw %ds
|
popw %ds
|
||||||
MSG(notification_step)
|
MSG(notification_step)
|
||||||
popw %di
|
popa
|
||||||
popw %si
|
|
||||||
|
|
||||||
/* check if finished with this dataset */
|
/* check if finished with this dataset */
|
||||||
cmpw $0, 4(%di)
|
cmpw $0, 4(%di)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue