summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--share/man/man9/mbuf.98
-rw-r--r--share/man/man9/mbuf_tags.96
-rw-r--r--sys/kern/uipc_mbuf.c10
-rw-r--r--sys/kern/uipc_mbuf2.c4
4 files changed, 15 insertions, 13 deletions
diff --git a/share/man/man9/mbuf.9 b/share/man/man9/mbuf.9
index fb14a0c975a..47b535bdcfa 100644
--- a/share/man/man9/mbuf.9
+++ b/share/man/man9/mbuf.9
@@ -1,4 +1,4 @@
-.\" $OpenBSD: mbuf.9,v 1.63 2013/06/05 11:30:23 jmc Exp $
+.\" $OpenBSD: mbuf.9,v 1.64 2013/06/11 01:01:15 dlg Exp $
.\"
.\" Copyright (c) 2001 Jean-Jacques Bernard-Gundol <jjbg@openbsd.org>
.\" All rights reserved.
@@ -25,7 +25,7 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: June 5 2013 $
+.Dd $Mdocdate: June 11 2013 $
.Dt MBUF 9
.Os
.Sh NAME
@@ -558,7 +558,9 @@ single mbuf or cluster.
.Fa wait
specifies whether it can wait or not for the replacement storage.
.Fn m_defrag
-returns 0 on success or \-1 on failure.
+returns 0 on success or
+.Er ENOBUFS
+on failure.
The mbuf pointer
.Fa m
remains in existence and unchanged on failure.
diff --git a/share/man/man9/mbuf_tags.9 b/share/man/man9/mbuf_tags.9
index 3c0266f5267..3916aea47ca 100644
--- a/share/man/man9/mbuf_tags.9
+++ b/share/man/man9/mbuf_tags.9
@@ -1,4 +1,4 @@
-.\" $OpenBSD: mbuf_tags.9,v 1.29 2013/06/04 19:27:09 schwarze Exp $
+.\" $OpenBSD: mbuf_tags.9,v 1.30 2013/06/11 01:01:15 dlg Exp $
.\"
.\" The author of this man page is Angelos D. Keromytis (angelos@cis.upenn.edu)
.\"
@@ -15,7 +15,7 @@
.\" MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR
.\" PURPOSE.
.\"
-.Dd $Mdocdate: June 4 2013 $
+.Dd $Mdocdate: June 11 2013 $
.Dt MBUF_TAGS 9
.Os
.Sh NAME
@@ -236,7 +236,7 @@ to packet
.Va mbuf2 .
On success, it returns 0.
Otherwise, it returns
-.Er ENOMEM .
+.Er ENOBUFS .
.Pp
.Fn m_tag_first
returns the first tag attached to packet
diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c
index f48f043ce6e..1f367ef2348 100644
--- a/sys/kern/uipc_mbuf.c
+++ b/sys/kern/uipc_mbuf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uipc_mbuf.c,v 1.171 2013/03/28 16:55:25 deraadt Exp $ */
+/* $OpenBSD: uipc_mbuf.c,v 1.172 2013/06/11 01:01:15 dlg Exp $ */
/* $NetBSD: uipc_mbuf.c,v 1.15.4.1 1996/06/13 17:11:44 cgd Exp $ */
/*
@@ -548,7 +548,7 @@ m_defrag(struct mbuf *m, int how)
struct mbuf *m0;
if (m->m_next == NULL)
- return 0;
+ return (0);
#ifdef DIAGNOSTIC
if (!(m->m_flags & M_PKTHDR))
@@ -556,12 +556,12 @@ m_defrag(struct mbuf *m, int how)
#endif
if ((m0 = m_gethdr(how, m->m_type)) == NULL)
- return -1;
+ return (ENOBUFS);
if (m->m_pkthdr.len > MHLEN) {
MCLGETI(m0, how, NULL, m->m_pkthdr.len);
if (!(m0->m_flags & M_EXT)) {
m_free(m0);
- return -1;
+ return (ENOBUFS);
}
}
m_copydata(m, 0, m->m_pkthdr.len, mtod(m0, caddr_t));
@@ -597,7 +597,7 @@ m_defrag(struct mbuf *m, int how)
m0->m_flags &= ~(M_EXT|M_CLUSTER); /* cluster is gone */
m_free(m0);
- return 0;
+ return (0);
}
/*
diff --git a/sys/kern/uipc_mbuf2.c b/sys/kern/uipc_mbuf2.c
index dd954e78a74..090594c2352 100644
--- a/sys/kern/uipc_mbuf2.c
+++ b/sys/kern/uipc_mbuf2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uipc_mbuf2.c,v 1.36 2013/02/07 11:06:42 mikeb Exp $ */
+/* $OpenBSD: uipc_mbuf2.c,v 1.37 2013/06/11 01:01:15 dlg Exp $ */
/* $KAME: uipc_mbuf2.c,v 1.29 2001/02/14 13:42:10 itojun Exp $ */
/* $NetBSD: uipc_mbuf.c,v 1.40 1999/04/01 00:23:25 thorpej Exp $ */
@@ -355,7 +355,7 @@ m_tag_copy_chain(struct mbuf *to, struct mbuf *from, int wait)
t = m_tag_copy(p, wait);
if (t == NULL) {
m_tag_delete_chain(to);
- return (ENOMEM);
+ return (ENOBUFS);
}
if (tprev == NULL)
SLIST_INSERT_HEAD(&to->m_pkthdr.tags, t, m_tag_link);