summaryrefslogtreecommitdiff
path: root/arch/um/drivers/net_user.c
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2006-07-10 15:45:15 +0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-07-11 00:24:24 +0400
commit9ead6feedd28091d86cde0843be914847b4e10e8 (patch)
treed477bd385e04d77d74823dbbaa4c840c235a5630 /arch/um/drivers/net_user.c
parent108ffa8cbfa323d462a2f4b49f38da3205d36e5a (diff)
downloadlinux-9ead6feedd28091d86cde0843be914847b4e10e8.tar.xz
[PATCH] uml: add some EINTR protection
Add some more uses of the CATCH_EINTR wrapper. 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>
Diffstat (limited to 'arch/um/drivers/net_user.c')
-rw-r--r--arch/um/drivers/net_user.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/arch/um/drivers/net_user.c b/arch/um/drivers/net_user.c
index 8cd851be0e4d..107c5e43fa00 100644
--- a/arch/um/drivers/net_user.c
+++ b/arch/um/drivers/net_user.c
@@ -105,9 +105,7 @@ int net_recvfrom(int fd, void *buf, int len)
{
int n;
- while(((n = recvfrom(fd, buf, len, 0, NULL, NULL)) < 0) &&
- (errno == EINTR)) ;
-
+ CATCH_EINTR(n = recvfrom(fd, buf, len, 0, NULL, NULL));
if(n < 0){
if(errno == EAGAIN)
return 0;
@@ -135,7 +133,7 @@ int net_send(int fd, void *buf, int len)
{
int n;
- while(((n = send(fd, buf, len, 0)) < 0) && (errno == EINTR)) ;
+ CATCH_EINTR(n = send(fd, buf, len, 0));
if(n < 0){
if(errno == EAGAIN)
return 0;
@@ -150,8 +148,8 @@ int net_sendto(int fd, void *buf, int len, void *to, int sock_len)
{
int n;
- while(((n = sendto(fd, buf, len, 0, (struct sockaddr *) to,
- sock_len)) < 0) && (errno == EINTR)) ;
+ CATCH_EINTR(n = sendto(fd, buf, len, 0, (struct sockaddr *) to,
+ sock_len));
if(n < 0){
if(errno == EAGAIN)
return 0;