diff options
Diffstat (limited to 'arch/um/drivers/pty.c')
-rw-r--r-- | arch/um/drivers/pty.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/um/drivers/pty.c b/arch/um/drivers/pty.c index 4123fe1fca98..49c79dda6046 100644 --- a/arch/um/drivers/pty.c +++ b/arch/um/drivers/pty.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) | 2 | * Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) |
3 | * Licensed under the GPL | 3 | * Licensed under the GPL |
4 | */ | 4 | */ |
@@ -6,16 +6,16 @@ | |||
6 | #include <stdio.h> | 6 | #include <stdio.h> |
7 | #include <stdlib.h> | 7 | #include <stdlib.h> |
8 | #include <unistd.h> | 8 | #include <unistd.h> |
9 | #include <string.h> | ||
10 | #include <fcntl.h> | ||
11 | #include <errno.h> | 9 | #include <errno.h> |
10 | #include <fcntl.h> | ||
11 | #include <string.h> | ||
12 | #include <termios.h> | 12 | #include <termios.h> |
13 | #include <sys/stat.h> | 13 | #include <sys/stat.h> |
14 | #include "chan_user.h" | 14 | #include "chan_user.h" |
15 | #include "os.h" | ||
16 | #include "user.h" | ||
17 | #include "kern_constants.h" | 15 | #include "kern_constants.h" |
16 | #include "os.h" | ||
18 | #include "um_malloc.h" | 17 | #include "um_malloc.h" |
18 | #include "user.h" | ||
19 | 19 | ||
20 | struct pty_chan { | 20 | struct pty_chan { |
21 | void (*announce)(char *dev_name, int dev); | 21 | void (*announce)(char *dev_name, int dev); |
@@ -33,7 +33,7 @@ static void *pty_chan_init(char *str, int device, const struct chan_opts *opts) | |||
33 | if (data == NULL) | 33 | if (data == NULL) |
34 | return NULL; | 34 | return NULL; |
35 | 35 | ||
36 | *data = ((struct pty_chan) { .announce = opts->announce, | 36 | *data = ((struct pty_chan) { .announce = opts->announce, |
37 | .dev = device, | 37 | .dev = device, |
38 | .raw = opts->raw }); | 38 | .raw = opts->raw }); |
39 | return data; | 39 | return data; |
@@ -101,7 +101,7 @@ static int getmaster(char *line) | |||
101 | *tp = 't'; | 101 | *tp = 't'; |
102 | err = access(line, R_OK | W_OK); | 102 | err = access(line, R_OK | W_OK); |
103 | *tp = 'p'; | 103 | *tp = 'p'; |
104 | if(!err) | 104 | if (!err) |
105 | return master; | 105 | return master; |
106 | close(master); | 106 | close(master); |
107 | } | 107 | } |
@@ -130,7 +130,7 @@ static int pty_open(int input, int output, int primary, void *d, | |||
130 | return err; | 130 | return err; |
131 | } | 131 | } |
132 | } | 132 | } |
133 | 133 | ||
134 | if (data->announce) | 134 | if (data->announce) |
135 | (*data->announce)(dev, data->dev); | 135 | (*data->announce)(dev, data->dev); |
136 | 136 | ||