aboutsummaryrefslogtreecommitdiff
path: root/gdb/ser-pipe.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/ser-pipe.c')
-rw-r--r--gdb/ser-pipe.c58
1 files changed, 28 insertions, 30 deletions
diff --git a/gdb/ser-pipe.c b/gdb/ser-pipe.c
index 47ccd33..9d129ae 100644
--- a/gdb/ser-pipe.c
+++ b/gdb/ser-pipe.c
@@ -38,9 +38,9 @@ static int pipe_open (struct serial *scb, const char *name);
static void pipe_close (struct serial *scb);
struct pipe_state
- {
- int pid;
- };
+{
+ int pid;
+};
/* Open up a raw pipe. */
@@ -82,7 +82,7 @@ pipe_open (struct serial *scb, const char *name)
fork() due to the fact that autoconf will ``#define vfork fork''
on certain platforms. */
pid = vfork ();
-
+
/* Error. */
if (pid == -1)
{
@@ -175,8 +175,8 @@ pipe_close (struct serial *scb)
wait_result = -1;
#ifdef HAVE_WAITPID
- wait_result = wait_to_die_with_timeout (state->pid, &status,
- PIPE_CLOSE_TIMEOUT);
+ wait_result
+ = wait_to_die_with_timeout (state->pid, &status, PIPE_CLOSE_TIMEOUT);
#endif
if (wait_result == -1)
{
@@ -212,32 +212,30 @@ gdb_pipe (int pdes[2])
#endif
}
-static const struct serial_ops pipe_ops =
-{
- "pipe",
- pipe_open,
- pipe_close,
- NULL,
- ser_base_readchar,
- ser_base_write,
- ser_base_flush_output,
- ser_base_flush_input,
- ser_base_send_break,
- ser_base_raw,
- ser_base_get_tty_state,
- ser_base_copy_tty_state,
- ser_base_set_tty_state,
- ser_base_print_tty_state,
- ser_base_setbaudrate,
- ser_base_setstopbits,
- ser_base_setparity,
- ser_base_drain_output,
- ser_base_async,
- ser_unix_read_prim,
- ser_unix_write_prim
-};
+static const struct serial_ops pipe_ops = { "pipe",
+ pipe_open,
+ pipe_close,
+ NULL,
+ ser_base_readchar,
+ ser_base_write,
+ ser_base_flush_output,
+ ser_base_flush_input,
+ ser_base_send_break,
+ ser_base_raw,
+ ser_base_get_tty_state,
+ ser_base_copy_tty_state,
+ ser_base_set_tty_state,
+ ser_base_print_tty_state,
+ ser_base_setbaudrate,
+ ser_base_setstopbits,
+ ser_base_setparity,
+ ser_base_drain_output,
+ ser_base_async,
+ ser_unix_read_prim,
+ ser_unix_write_prim };
void _initialize_ser_pipe ();
+
void
_initialize_ser_pipe ()
{