aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote-st.c
diff options
context:
space:
mode:
authorFernando Nasser <fnasser@redhat.com>2001-05-12 21:05:59 +0000
committerFernando Nasser <fnasser@redhat.com>2001-05-12 21:05:59 +0000
commit67dd5ca6911d587bbb65f527c81423d6e535ac5f (patch)
treebd7a5a1e24fced25356403d13c4acf1cb190b05f /gdb/remote-st.c
parent8d5ec59972b838fdd5ebe6039b57cb20254a863f (diff)
downloadgdb-67dd5ca6911d587bbb65f527c81423d6e535ac5f.zip
gdb-67dd5ca6911d587bbb65f527c81423d6e535ac5f.tar.gz
gdb-67dd5ca6911d587bbb65f527c81423d6e535ac5f.tar.bz2
2001-05-12 Fernando Nasser <fnasser@redhat.com>
* remote-e7000.c (e7000_open): Check for bad baud rate. * remote-st.c (st2000_open): Ditto.
Diffstat (limited to 'gdb/remote-st.c')
-rw-r--r--gdb/remote-st.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gdb/remote-st.c b/gdb/remote-st.c
index 868c08e..55e1392 100644
--- a/gdb/remote-st.c
+++ b/gdb/remote-st.c
@@ -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);