forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This patch lays some groundwork for the next one, which converts calls to os_{read,write}_file into {read,write}, by doing some tidying in the affected areas. do_not_aio gets restructured to make the final result a bit cleaner. There are also whitespace and other formatting fixes, fixes in error messages, and a typo fix. Signed-off-by: Jeff Dike <[email protected]> Cc: Paolo 'Blaisorblade' Giarrusso <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
- Loading branch information
Showing
7 changed files
with
47 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (C) 2001 Lennert Buytenhek ([email protected]) and | ||
* Copyright (C) 2001 Lennert Buytenhek ([email protected]) and | ||
* James Leu ([email protected]). | ||
* Copyright (C) 2001 by various other people who didn't put their name here. | ||
* Licensed under the GPL. | ||
|
@@ -49,8 +49,11 @@ static void etap_change(int op, unsigned char *addr, unsigned char *netmask, | |
memcpy(change.addr, addr, sizeof(change.addr)); | ||
memcpy(change.netmask, netmask, sizeof(change.netmask)); | ||
n = os_write_file(fd, &change, sizeof(change)); | ||
if(n != sizeof(change)) | ||
if(n != sizeof(change)){ | ||
printk("etap_change - request failed, err = %d\n", -n); | ||
return; | ||
} | ||
|
||
output = um_kmalloc(UM_KERN_PAGE_SIZE); | ||
if(output == NULL) | ||
printk("etap_change : Failed to allocate output buffer\n"); | ||
|
@@ -116,7 +119,8 @@ static int etap_tramp(char *dev, char *gate, int control_me, | |
pe_data.data_me = data_me; | ||
pid = run_helper(etap_pre_exec, &pe_data, args, NULL); | ||
|
||
if(pid < 0) err = pid; | ||
if(pid < 0) | ||
err = pid; | ||
os_close_file(data_remote); | ||
os_close_file(control_remote); | ||
n = os_read_file(control_me, &c, sizeof(c)); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters