diff options
Diffstat (limited to 'arch/um/os-Linux/drivers/ethertap_user.c')
-rw-r--r-- | arch/um/os-Linux/drivers/ethertap_user.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/arch/um/os-Linux/drivers/ethertap_user.c b/arch/um/os-Linux/drivers/ethertap_user.c index 96e12ea8172c..fd6cfa5b4a78 100644 --- a/arch/um/os-Linux/drivers/ethertap_user.c +++ b/arch/um/os-Linux/drivers/ethertap_user.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2001 Lennert Buytenhek (buytenh@gnu.org) and | 2 | * Copyright (C) 2001 Lennert Buytenhek (buytenh@gnu.org) and |
3 | * James Leu (jleu@mindspring.net). | 3 | * James Leu (jleu@mindspring.net). |
4 | * Copyright (C) 2001 by various other people who didn't put their name here. | 4 | * Copyright (C) 2001 by various other people who didn't put their name here. |
5 | * Licensed under the GPL. | 5 | * Licensed under the GPL. |
@@ -49,8 +49,11 @@ static void etap_change(int op, unsigned char *addr, unsigned char *netmask, | |||
49 | memcpy(change.addr, addr, sizeof(change.addr)); | 49 | memcpy(change.addr, addr, sizeof(change.addr)); |
50 | memcpy(change.netmask, netmask, sizeof(change.netmask)); | 50 | memcpy(change.netmask, netmask, sizeof(change.netmask)); |
51 | n = os_write_file(fd, &change, sizeof(change)); | 51 | n = os_write_file(fd, &change, sizeof(change)); |
52 | if(n != sizeof(change)) | 52 | if(n != sizeof(change)){ |
53 | printk("etap_change - request failed, err = %d\n", -n); | 53 | printk("etap_change - request failed, err = %d\n", -n); |
54 | return; | ||
55 | } | ||
56 | |||
54 | output = um_kmalloc(UM_KERN_PAGE_SIZE); | 57 | output = um_kmalloc(UM_KERN_PAGE_SIZE); |
55 | if(output == NULL) | 58 | if(output == NULL) |
56 | printk("etap_change : Failed to allocate output buffer\n"); | 59 | printk("etap_change : Failed to allocate output buffer\n"); |
@@ -116,7 +119,8 @@ static int etap_tramp(char *dev, char *gate, int control_me, | |||
116 | pe_data.data_me = data_me; | 119 | pe_data.data_me = data_me; |
117 | pid = run_helper(etap_pre_exec, &pe_data, args, NULL); | 120 | pid = run_helper(etap_pre_exec, &pe_data, args, NULL); |
118 | 121 | ||
119 | if(pid < 0) err = pid; | 122 | if(pid < 0) |
123 | err = pid; | ||
120 | os_close_file(data_remote); | 124 | os_close_file(data_remote); |
121 | os_close_file(control_remote); | 125 | os_close_file(control_remote); |
122 | n = os_read_file(control_me, &c, sizeof(c)); | 126 | n = os_read_file(control_me, &c, sizeof(c)); |