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 93dc1911363..90e0e5ff451 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, fd = mkstemp(file); if(fd < 0){ + err = -errno; printk("xterm_open : mkstemp failed, errno = %d\n", errno); - return(-errno); + return err; } if(unlink(file)){ + err = -errno; printk("xterm_open : unlink failed, errno = %d\n", errno); - return(-errno); + return err; } os_close_file(fd); |