diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-12-31 06:30:31 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-12-31 06:30:31 +0000 |
commit | 441e19135c55112feb38692d41a290347f87e744 (patch) | |
tree | 828009ff6ce5c5329ddcd4a5f5bd230e5e7ab532 | |
parent | afc4e5d5e0868271cd5b35149e018636bc1f7825 (diff) |
return error instead of EINTR; brian
-rw-r--r-- | sys/net/if_tun.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c index 525168008dc..d2252bc9489 100644 --- a/sys/net/if_tun.c +++ b/sys/net/if_tun.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_tun.c,v 1.21 1997/12/31 01:22:55 deraadt Exp $ */ +/* $OpenBSD: if_tun.c,v 1.22 1997/12/31 06:30:30 deraadt Exp $ */ /* $NetBSD: if_tun.c,v 1.24 1996/05/07 02:40:48 thorpej Exp $ */ /* @@ -492,10 +492,10 @@ tunread(dev, uio, ioflag) s = splimp(); do { while ((tp->tun_flags & TUN_READY) != TUN_READY) - if (tsleep((caddr_t)tp, (PZERO+1)|PCATCH, - "tunread", 0) != 0) { + if ((error = tsleep((caddr_t)tp, + (PZERO+1)|PCATCH, "tunread", 0)) != 0) { splx(s); - return(EINTR); + return (error); } IF_DEQUEUE(&ifp->if_snd, m0); if (m0 == 0) { @@ -504,10 +504,10 @@ tunread(dev, uio, ioflag) return EWOULDBLOCK; } tp->tun_flags |= TUN_RWAIT; - if (tsleep((caddr_t)tp, (PZERO + 1)|PCATCH, - "tunread", 0) != 0) { + if ((error = tsleep((caddr_t)tp, + (PZERO + 1)|PCATCH, "tunread", 0)) != 0) { splx(s); - return EINTR; + return (error); } } } while (m0 == 0); |