diff options
author | alfred <alfred@FreeBSD.org> | 2003-01-21 08:56:16 +0000 |
---|---|---|
committer | alfred <alfred@FreeBSD.org> | 2003-01-21 08:56:16 +0000 |
commit | bf8e8a6e8f0bd9165109f0a258730dd242299815 (patch) | |
tree | f16a2fb9fa7a7fbc4c19e981d278d5f6eb53234d /sys/net/if_tun.c | |
parent | 2180deee00350fff613a1d1d1328eddc4c0ba9c8 (diff) | |
download | FreeBSD-src-bf8e8a6e8f0bd9165109f0a258730dd242299815.zip FreeBSD-src-bf8e8a6e8f0bd9165109f0a258730dd242299815.tar.gz |
Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.
Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
Diffstat (limited to 'sys/net/if_tun.c')
-rw-r--r-- | sys/net/if_tun.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c index ce39d1f..3bb5a8c 100644 --- a/sys/net/if_tun.c +++ b/sys/net/if_tun.c @@ -240,7 +240,7 @@ tuncreate(dev_t dev) dev = make_dev(&tun_cdevsw, minor(dev), UID_UUCP, GID_DIALER, 0600, "tun%d", dev2unit(dev)); - MALLOC(sc, struct tun_softc *, sizeof(*sc), M_TUN, M_WAITOK | M_ZERO); + MALLOC(sc, struct tun_softc *, sizeof(*sc), M_TUN, M_ZERO); sc->tun_flags = TUN_INITED; sc->next = tunhead; tunhead = sc; @@ -494,7 +494,7 @@ tunoutput( /* prepend sockaddr? this may abort if the mbuf allocation fails */ if (tp->tun_flags & TUN_LMODE) { /* allocate space for sockaddr */ - M_PREPEND(m0, dst->sa_len, M_DONTWAIT); + M_PREPEND(m0, dst->sa_len, M_NOWAIT); /* if allocation failed drop packet */ if (m0 == NULL) { @@ -508,7 +508,7 @@ tunoutput( if (tp->tun_flags & TUN_IFHEAD) { /* Prepend the address family */ - M_PREPEND(m0, 4, M_DONTWAIT); + M_PREPEND(m0, 4, M_NOWAIT); /* if allocation failed drop packet */ if (m0 == NULL) { @@ -728,7 +728,7 @@ tunwrite(dev_t dev, struct uio *uio, int flag) tlen = uio->uio_resid; /* get a header mbuf */ - MGETHDR(m, M_DONTWAIT, MT_DATA); + MGETHDR(m, M_NOWAIT, MT_DATA); if (m == NULL) return (ENOBUFS); mlen = MHLEN; @@ -741,7 +741,7 @@ tunwrite(dev_t dev, struct uio *uio, int flag) *mp = m; mp = &m->m_next; if (uio->uio_resid > 0) { - MGET (m, M_DONTWAIT, MT_DATA); + MGET (m, M_NOWAIT, MT_DATA); if (m == 0) { error = ENOBUFS; break; |