diff options
Diffstat (limited to 'arch/um/drivers/xterm.c')
-rw-r--r-- | arch/um/drivers/xterm.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/um/drivers/xterm.c b/arch/um/drivers/xterm.c index 93dc1911363f..90e0e5ff451e 100644 --- a/arch/um/drivers/xterm.c +++ b/arch/um/drivers/xterm.c | |||
@@ -110,13 +110,15 @@ int xterm_open(int input, int output, int primary, void *d, | |||
110 | 110 | ||
111 | fd = mkstemp(file); | 111 | fd = mkstemp(file); |
112 | if(fd < 0){ | 112 | if(fd < 0){ |
113 | err = -errno; | ||
113 | printk("xterm_open : mkstemp failed, errno = %d\n", errno); | 114 | printk("xterm_open : mkstemp failed, errno = %d\n", errno); |
114 | return(-errno); | 115 | return err; |
115 | } | 116 | } |
116 | 117 | ||
117 | if(unlink(file)){ | 118 | if(unlink(file)){ |
119 | err = -errno; | ||
118 | printk("xterm_open : unlink failed, errno = %d\n", errno); | 120 | printk("xterm_open : unlink failed, errno = %d\n", errno); |
119 | return(-errno); | 121 | return err; |
120 | } | 122 | } |
121 | os_close_file(fd); | 123 | os_close_file(fd); |
122 | 124 | ||