bug-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

BUG: serial --port and --speed are swapped


From: Alessandro Rubini
Subject: BUG: serial --port and --speed are swapped
Date: Fri, 6 Oct 2000 01:04:47 +0200

While documenting the new commands, I noted that the code in stage2.c
has a bug: the "--port" and "--speed" arguments are swapped:
"--port" sets the speed and "--speed" sets the port.

Applies to both branches. In an hour or so I'll send in a patch for
the "commands" chapter, unless new bugs appear and slow me down :)

Index: ChangeLog
===================================================================
RCS file: /cvs/grub/ChangeLog,v
retrieving revision 1.327
diff -u -d -u -r1.327 ChangeLog
--- ChangeLog   2000/10/05 04:43:25     1.327
+++ ChangeLog   2000/10/05 23:02:03
@@ -1,3 +1,8 @@
+2000-10-06  Alessandro Rubini  <address@hidden>
+
+       * stage2/builtins.c (serial_func): bugfix: "speed" and "port" were
+       swapped.
+
 2000-10-05  OKUJI Yoshinori  <address@hidden>
 
        * configure.in (AM_INIT_AUTOMAKE): The version number is set to
Index: stage2/builtins.c
===================================================================
RCS file: /cvs/grub/stage2/builtins.c,v
retrieving revision 1.84
diff -u -d -u -r1.84 builtins.c
--- stage2/builtins.c   2000/09/29 18:55:27     1.84
+++ stage2/builtins.c   2000/10/05 23:02:06
@@ -2967,7 +2967,7 @@
          if (! safe_parse_maxint (&p, &num))
            return 1;
 
-         port = (unsigned int) num;
+         speed = (unsigned int) num;
        }
       else if (grub_memcmp (arg, "--port=", sizeof ("--port=") - 1) == 0)
        {
@@ -2977,7 +2977,7 @@
          if (! safe_parse_maxint (&p, &num))
            return 1;
 
-         speed = (unsigned short) num;
+         port = (unsigned short) num;
        }
       else if (grub_memcmp (arg, "--word=", sizeof ("--word=") - 1) == 0)
        {



reply via email to

[Prev in Thread] Current Thread [Next in Thread]