From c325ead317e81bdf018e532eb1948066624fd588 Mon Sep 17 00:00:00 2001 From: okuji Date: Mon, 15 Jan 2001 05:54:09 +0000 Subject: [PATCH] fix typos in setkey_func. --- ChangeLog | 9 +++++++++ docs/user-ref.texi | 8 ++++---- stage2/builtins.c | 4 ++-- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index a6b776b95..fb6f04975 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2001-01-15 OKUJI Yoshinori + + From Thierry Laronde : + * docs/user-ref.texi (Command-line and menu commands): Update + the description about setkey. + * stage2/builtins.c (setkey_func): When checking if TO_KEY and + FROM_KEY are specified, see *TO_KEY and *FROM_KEY instead of + TO_KEY and FROM_KEY, respectively. + 2001-01-13 OKUJI Yoshinori From Thierry Laronde : diff --git a/docs/user-ref.texi b/docs/user-ref.texi index 057308089..39314cbb5 100644 --- a/docs/user-ref.texi +++ b/docs/user-ref.texi @@ -736,11 +736,11 @@ The serial port is not used as a communication channel unless the This command is only available if GRUB is compiled with serial support. @end deffn -@deffn Command setkey to_key from_key +@deffn Command setkey [to_key from_key] Change the keyboard map. The key @var{from_key} is mapped to the key -@var{to_key}. Note that this command @emph{does not} exchange the -keys. If you want to exchange the keys, run this command again with the -arguments exchanged, like this: +@var{to_key}. If no argument is specified, reset key mappings. Note that +this command @emph{does not} exchange the keys. If you want to exchange +the keys, run this command again with the arguments exchanged, like this: @example grub> @kbd{setkey capslock control} diff --git a/stage2/builtins.c b/stage2/builtins.c index a00fae0c7..d6a102d16 100644 --- a/stage2/builtins.c +++ b/stage2/builtins.c @@ -3394,7 +3394,7 @@ setkey_func (char *arg, int flags) to_key = arg; from_key = skip_to (0, to_key); - if (! to_key) + if (! *to_key) { /* If the user specifies no argument, reset the key mappings. */ grub_memset (bios_key_map, 0, KEY_MAP_SIZE * sizeof (unsigned short)); @@ -3402,7 +3402,7 @@ setkey_func (char *arg, int flags) return 0; } - else if (! from_key) + else if (! *from_key) { /* The user must specify two arguments or zero argument. */ errnum = ERR_BAD_ARGUMENT;