diff options
Diffstat (limited to 'arch/um/drivers/xterm.c')
-rw-r--r-- | arch/um/drivers/xterm.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/arch/um/drivers/xterm.c b/arch/um/drivers/xterm.c index 87e18bf2c667..8a1c18a9b240 100644 --- a/arch/um/drivers/xterm.c +++ b/arch/um/drivers/xterm.c | |||
@@ -1,11 +1,11 @@ | |||
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 | */ |
5 | 5 | ||
6 | #include <stddef.h> | 6 | #include <stddef.h> |
7 | #include <stdlib.h> | ||
8 | #include <stdio.h> | 7 | #include <stdio.h> |
8 | #include <stdlib.h> | ||
9 | #include <unistd.h> | 9 | #include <unistd.h> |
10 | #include <errno.h> | 10 | #include <errno.h> |
11 | #include <string.h> | 11 | #include <string.h> |
@@ -96,8 +96,10 @@ static int xterm_open(int input, int output, int primary, void *d, | |||
96 | if (access(argv[4], X_OK) < 0) | 96 | if (access(argv[4], X_OK) < 0) |
97 | argv[4] = "port-helper"; | 97 | argv[4] = "port-helper"; |
98 | 98 | ||
99 | /* Check that DISPLAY is set, this doesn't guarantee the xterm | 99 | /* |
100 | * will work but w/o it we can be pretty sure it won't. */ | 100 | * Check that DISPLAY is set, this doesn't guarantee the xterm |
101 | * will work but w/o it we can be pretty sure it won't. | ||
102 | */ | ||
101 | if (getenv("DISPLAY") == NULL) { | 103 | if (getenv("DISPLAY") == NULL) { |
102 | printk(UM_KERN_ERR "xterm_open: $DISPLAY not set.\n"); | 104 | printk(UM_KERN_ERR "xterm_open: $DISPLAY not set.\n"); |
103 | return -ENODEV; | 105 | return -ENODEV; |
@@ -196,7 +198,7 @@ static int xterm_open(int input, int output, int primary, void *d, | |||
196 | static void xterm_close(int fd, void *d) | 198 | static void xterm_close(int fd, void *d) |
197 | { | 199 | { |
198 | struct xterm_chan *data = d; | 200 | struct xterm_chan *data = d; |
199 | 201 | ||
200 | if (data->pid != -1) | 202 | if (data->pid != -1) |
201 | os_kill_process(data->pid, 1); | 203 | os_kill_process(data->pid, 1); |
202 | data->pid = -1; | 204 | data->pid = -1; |