This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RedBoot baud rate changing makes my head hurt.


er, is __COMMCTL_SETBAUD supposed to return the old baud rate or just
success/failure? Most implementations I can find seem to return the
latter, which makes sense to me. Therefore I needed this...

Index: ChangeLog
===================================================================
RCS file: /cvs/cvsfiles/ecc/ecc/redboot/current/ChangeLog,v
retrieving revision 1.404
diff -u -p -r1.404 ChangeLog
--- ChangeLog	13 Nov 2003 14:40:55 -0000	1.404
+++ ChangeLog	19 Nov 2003 16:54:40 -0000
@@ -1,3 +1,7 @@
+2003-11-19  David Woodhouse  <dwmw2@redhat.com>
+
+	* src/main.c: Restore correct old baud rate if changing fails.
+
 2003-11-13  David Woodhouse  <dwmw2@redhat.com>
 
 	* src/net/bootp.c: Don't send bad DHCP options.
Index: src/main.c
===================================================================
RCS file: /cvs/cvsfiles/ecc/ecc/redboot/current/src/main.c,v
retrieving revision 1.101
diff -u -p -r1.101 main.c
--- src/main.c	21 May 2003 12:36:53 -0000	1.101
+++ src/main.c	19 Nov 2003 16:54:40 -0000
@@ -629,7 +629,6 @@ do_baud_rate(int argc, char *argv[])
             }
             return;  // Couldn't set the desired rate
         }
-        old_rate = ret;
         // Make sure this new rate works or back off to previous value
         // Sleep for a few seconds, then prompt to see if it works
         _sleep(3000);  // Give serial time to flush


-- 
dwmw2


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]