diff options
author | 1997-12-31 06:30:30 +0000 | |
---|---|---|
committer | 1997-12-31 06:30:30 +0000 | |
commit | 40bbdc59b3af8f57f80c38c05a8a1efe4c3ce59c (patch) | |
tree | 65c0ad7a0475065a88aa0a77256a1d3a54f8b87c | |
parent | make the loopback interfaces ordered in the iface list, so they show up in netstat much better; this particular case showed up with more than one loopback configured in the kernel (diff) | |
download | wireguard-openbsd-40bbdc59b3af8f57f80c38c05a8a1efe4c3ce59c.tar.xz wireguard-openbsd-40bbdc59b3af8f57f80c38c05a8a1efe4c3ce59c.zip |
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); |