summaryrefslogtreecommitdiff
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
commitb2e3d8a821e90b695aec6e75bf3175ebcef93a05 (patch)
treec88cec9ff2541d17bc9b1513d89281c461f01ee9 /gdb/remote-st.c
parentd6a55d83970907b0a5d6a76e5a1fbf373a187012 (diff)
downloadgdb-b2e3d8a821e90b695aec6e75bf3175ebcef93a05.tar.gz
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 868c08ed484..55e1392642d 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);