Guard against 'current_directory == NULL' on gdb_abspath (PR gdb/23613)
[deliverable/binutils-gdb.git] / gdb / ser-go32.c
index 00fc6b6b678305d3bb384fc472156d266da64a52..27d7c08575df4913f0ab8054af1b4f71b7ff0383 100644 (file)
@@ -1,5 +1,5 @@
 /* Remote serial interface for local (hardwired) serial ports for GO32.
-   Copyright (C) 1992-2017 Free Software Foundation, Inc.
+   Copyright (C) 1992-2019 Free Software Foundation, Inc.
 
    Contributed by Nigel Stephens, Algorithmics Ltd. (nigel@algor.co.uk).
 
@@ -655,7 +655,7 @@ dos_get_tty_state (struct serial *scb)
       /* We've never heard about this port.  We should fail this call,
         unless they are asking about one of the 3 standard handles,
         in which case we pretend the handle was open by us if it is
-        connected to a terminal device.  This is beacuse Unix
+        connected to a terminal device.  This is because Unix
         terminals use the serial interface, so GDB expects the
         standard handles to go through here.  */
       if (scb->fd >= 3 || !isatty (scb->fd))
@@ -688,17 +688,6 @@ dos_set_tty_state (struct serial *scb, serial_ttystate ttystate)
   return 0;
 }
 
-static int
-dos_noflush_set_tty_state (struct serial *scb, serial_ttystate new_ttystate,
-                          serial_ttystate old_ttystate)
-{
-  struct dos_ttystate *state;
-
-  state = (struct dos_ttystate *) new_ttystate;
-  dos_setbaudrate (scb, state->baudrate);
-  return 0;
-}
-
 static int
 dos_flush_input (struct serial *scb)
 {
@@ -882,7 +871,6 @@ static const struct serial_ops dos_ops =
   dos_copy_tty_state,
   dos_set_tty_state,
   dos_print_tty_state,
-  dos_noflush_set_tty_state,
   dos_setbaudrate,
   dos_setstopbits,
   dos_setparity,
@@ -899,7 +887,7 @@ gdb_pipe (int pdes[2])
 }
 
 static void
-dos_info (char *arg, int from_tty)
+info_serial_command (const char *arg, int from_tty)
 {
   struct dos_ttystate *port;
 #ifdef DOS_STATS
@@ -927,9 +915,6 @@ dos_info (char *arg, int from_tty)
 #endif
 }
 
-/* -Wmissing-prototypes */
-extern initialize_file_ftype _initialize_ser_dos;
-
 void
 _initialize_ser_dos (void)
 {
@@ -999,6 +984,6 @@ Show COM4 interrupt request."), NULL,
                            NULL, /* FIXME: i18n: */
                            &setlist, &showlist);
 
-  add_info ("serial", dos_info,
+  add_info ("serial", info_serial_command,
            _("Print DOS serial port status."));
 }
This page took 0.024912 seconds and 4 git commands to generate.