2001-05-12 Fernando Nasser <fnasser@redhat.com>
authorFernando Nasser <fnasser@redhat.com>
Sat, 12 May 2001 21:05:59 +0000 (21:05 +0000)
committerFernando Nasser <fnasser@redhat.com>
Sat, 12 May 2001 21:05:59 +0000 (21:05 +0000)
* remote-e7000.c (e7000_open): Check for bad baud rate.
* remote-st.c (st2000_open): Ditto.

gdb/ChangeLog
gdb/remote-e7000.c
gdb/remote-st.c

index 55cc0690976853407b84c19e5dd9818cd30baa45..022495de0f432042e9435a140c7db76363e3a9ec 100644 (file)
@@ -1,3 +1,8 @@
+2001-05-12  Fernando Nasser  <fnasser@redhat.com>
+
+       * remote-e7000.c (e7000_open): Check for bad baud rate.
+       * remote-st.c (st2000_open): Ditto.
+
 2001-05-11  Jim Blandy  <jimb@redhat.com>
 
        * thread.c (do_captured_list_thread_ids): Use ui_out_tuple_begin
index 4e7c97c8682d016fb95cdf587404e54b600eecad..34ac3456d055c01e3e62a35e752ca54cf2e6c25a 100644 (file)
@@ -667,7 +667,11 @@ e7000_open (char *args, int from_tty)
   if (!e7000_desc)
     perror_with_name (dev_name);
 
-  SERIAL_SETBAUDRATE (e7000_desc, baudrate);
+  if (SERIAL_SETBAUDRATE (e7000_desc, baudrate))
+    {
+      SERIAL_CLOSE (dev_name);
+      perror_with_name (dev_name);
+    }
   SERIAL_RAW (e7000_desc);
 
 #ifdef GDB_TARGET_IS_H8300
index 868c08ed48421b212cd760c39189bb8115d3993d..55e1392642d75f2f872067146f14dd713f31dc77 100644 (file)
@@ -285,7 +285,11 @@ or target st2000 <host> <port>\n");
   if (!st2000_desc)
     perror_with_name (dev_name);
 
-  SERIAL_SETBAUDRATE (st2000_desc, baudrate);
+  if (SERIAL_SETBAUDRATE (st2000_desc, baudrate))
+    {
+      SERIAL_CLOSE (dev_name);
+      perror_with_name (dev_name);
+    }
 
   SERIAL_RAW (st2000_desc);