diff options
author | K. Richard Pixley <rich@cygnus> | 1993-09-14 19:34:15 +0000 |
---|---|---|
committer | K. Richard Pixley <rich@cygnus> | 1993-09-14 19:34:15 +0000 |
commit | a94abe5bb7a71b207691f8b50406166eefda8186 (patch) | |
tree | ceb7f9fc4dbb91e195b1fd73257cfe52ffe4a1b7 /gdb/remote-mon.c | |
parent | fc77365385a7f284e7ce45dac924bbd07d7bc2fb (diff) | |
download | gdb-a94abe5bb7a71b207691f8b50406166eefda8186.zip gdb-a94abe5bb7a71b207691f8b50406166eefda8186.tar.gz gdb-a94abe5bb7a71b207691f8b50406166eefda8186.tar.bz2 |
use remote-utils facilities for baud_rate
Diffstat (limited to 'gdb/remote-mon.c')
-rw-r--r-- | gdb/remote-mon.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/gdb/remote-mon.c b/gdb/remote-mon.c index d9367a8..989729c 100644 --- a/gdb/remote-mon.c +++ b/gdb/remote-mon.c @@ -49,6 +49,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "command.h" #include "serial.h" #include "monitor.h" +#include "remote-utils.h" #ifdef HAVE_TERMIO # define TERMINAL struct termios @@ -337,16 +338,10 @@ general_open(args, name, from_tty) perror_with_name(dev_name); /* The baud rate was specified when GDB was started. */ - if (baud_rate) + if (SERIAL_SETBAUDRATE (monitor_desc, sr_get_baud_rate())) { - int rate; - - if (sscanf (baud_rate, "%d", &rate) == 1) - if (SERIAL_SETBAUDRATE (monitor_desc, rate)) - { - SERIAL_CLOSE (monitor_desc); - perror_with_name (name); - } + SERIAL_CLOSE (monitor_desc); + perror_with_name (name); } SERIAL_RAW(monitor_desc); |