]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
fix typos in setkey_func.
authorokuji <okuji@localhost>
Mon, 15 Jan 2001 05:54:09 +0000 (05:54 +0000)
committerokuji <okuji@localhost>
Mon, 15 Jan 2001 05:54:09 +0000 (05:54 +0000)
ChangeLog
docs/user-ref.texi
stage2/builtins.c

index a6b776b95c9332dbe3ddd828b70332da4984d067..fb6f04975af719d7d632da278ac57e8c20aa3d9b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2001-01-15  OKUJI Yoshinori  <okuji@gnu.org>
+
+       From Thierry Laronde <thierry.laronde@polynum.com>:
+       * 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  <okuji@gnu.org>
 
        From Thierry Laronde <thierry.laronde@polynum.com>:
index 0573080893e16d98f6c769c2f770cbf13069da02..39314cbb552bc431b13c4209e46ae9ee655bc77d 100644 (file)
@@ -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}
index a00fae0c731e66e93646efd57a9b16be861a775c..d6a102d16020f262142c94ffbec2b132d7fe6bec 100644 (file)
@@ -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;