]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/term/serial.c (options), (grub_cmd_serial): Fix handling
authorVladimir Serbinenko <phcoder@gmail.com>
Fri, 1 Nov 2013 18:46:30 +0000 (19:46 +0100)
committerVladimir Serbinenko <phcoder@gmail.com>
Fri, 1 Nov 2013 18:46:30 +0000 (19:46 +0100)
of SI suffixes.

ChangeLog
grub-core/term/serial.c

index 0470480ae763598a9716b990e772a068ee54cc47..c59def2b2a3f45aa1aecc0dbe0ccf50d3ecf43bf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-11-01  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * grub-core/term/serial.c (options), (grub_cmd_serial): Fix handling
+       of SI suffixes.
+
 2013-11-01  Vladimir Serbinenko  <phcoder@gmail.com>
 
        Support --base-clock for serial command to handle weird cards with
index 0298ec613c9054ed713f0b660d6dfa2da8b79b33..2b97fcc6d685d9f70f35748dd8dfd3df34eb1da6 100644 (file)
@@ -59,7 +59,7 @@ static const struct grub_arg_option options[] =
   {"word",   'w', 0, N_("Set the serial port word length."), 0, ARG_TYPE_INT},
   {"parity", 'r', 0, N_("Set the serial port parity."),      0, ARG_TYPE_STRING},
   {"stop",   't', 0, N_("Set the serial port stop bits."),   0, ARG_TYPE_INT},
-  {"base-clock",   'b', 0, N_("Set the base clock."),   0, ARG_TYPE_INT},
+  {"base-clock",   'b', 0, N_("Set the base clock."),   0, ARG_TYPE_STRING},
   {0, 0, 0, 0, 0, 0}
 };
 
@@ -254,6 +254,8 @@ grub_cmd_serial (grub_extcmd_context_t ctxt, int argc, char **args)
     {
       char *ptr;
       config.base_clock = grub_strtoull (state[OPTION_BASE_CLOCK].arg, &ptr, 0);
+      if (grub_errno)
+       return grub_errno;
       if (ptr && *ptr == 'M')
        config.base_clock *= 1000000;
       if (ptr && (*ptr == 'k' || *ptr == 'K'))