[PATCH] uml: error handling fixes
Blairsorblade noticed some confusion between our use of a system call's return value and errno. This patch fixes a number of related bugs - using errno instead of a return value using a return value instead of errno forgetting to negate a error return to get a positive error code Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
347b3dc2fa
commit
2ace87b950
@@ -171,7 +171,7 @@ int os_sigio_async(int master, int slave)
|
||||
|
||||
flags = fcntl(master, F_GETFL);
|
||||
if(flags < 0)
|
||||
return errno;
|
||||
return -errno;
|
||||
|
||||
if((fcntl(master, F_SETFL, flags | O_NONBLOCK | O_ASYNC) < 0) ||
|
||||
(fcntl(master, F_SETOWN, os_getpid()) < 0))
|
||||
|
Reference in New Issue
Block a user