aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/drivers/net_user.c
diff options
context:
space:
mode:
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)
105{ 105{
106 int n; 106 int n;
107 107
108 while(((n = recvfrom(fd, buf, len, 0, NULL, NULL)) < 0) && 108 CATCH_EINTR(n = recvfrom(fd, buf, len, 0, NULL, NULL));
109 (errno == EINTR)) ;
110
111 if(n < 0){ 109 if(n < 0){
112 if(errno == EAGAIN) 110 if(errno == EAGAIN)
113 return 0; 111 return 0;
@@ -135,7 +133,7 @@ int net_send(int fd, void *buf, int len)
135{ 133{
136 int n; 134 int n;
137 135
138 while(((n = send(fd, buf, len, 0)) < 0) && (errno == EINTR)) ; 136 CATCH_EINTR(n = send(fd, buf, len, 0));
139 if(n < 0){ 137 if(n < 0){
140 if(errno == EAGAIN) 138 if(errno == EAGAIN)
141 return 0; 139 return 0;
@@ -150,8 +148,8 @@ int net_sendto(int fd, void *buf, int len, void *to, int sock_len)
150{ 148{
151 int n; 149 int n;
152 150
153 while(((n = sendto(fd, buf, len, 0, (struct sockaddr *) to, 151 CATCH_EINTR(n = sendto(fd, buf, len, 0, (struct sockaddr *) to,
154 sock_len)) < 0) && (errno == EINTR)) ; 152 sock_len));
155 if(n < 0){ 153 if(n < 0){
156 if(errno == EAGAIN) 154 if(errno == EAGAIN)
157 return 0; 155 return 0;