PERFORCE change 27379 for review

Robert Watson rwatson at freebsd.org
Tue Mar 25 20:16:47 GMT 2003


http://perforce.freebsd.org/chv.cgi?CH=27379

Change 27379 by rwatson at rwatson_tislabs on 2003/03/25 12:16:37

	Rename MBUF_TO_MALLOC() to MBTOM(), which is substantially
	more compact.
	
	Suggested by:	sam

Affected files ...

.. //depot/projects/trustedbsd/mac/sys/kern/subr_mbuf.c#30 edit
.. //depot/projects/trustedbsd/mac/sys/sys/mbuf.h#25 edit

Differences ...

==== //depot/projects/trustedbsd/mac/sys/kern/subr_mbuf.c#30 (text+ko) ====

@@ -1306,7 +1306,7 @@
 	if (mb != NULL) {
 		_mbhdr_setup(mb, type);
 #ifdef MAC
-		if (mac_init_mbuf(mb, MBUF_TO_MALLOC(how)) != 0) {
+		if (mac_init_mbuf(mb, MBTOM(how)) != 0) {
 			m_free(mb);
 			return NULL;
 		}
@@ -1355,7 +1355,7 @@
 	if (mb != NULL) {
 		_mbhdr_setup(mb, type);
 #ifdef MAC
-		if (mac_init_mbuf(mb, MBUF_TO_MALLOC(how)) != 0) {
+		if (mac_init_mbuf(mb, MBTOM(how)) != 0) {
 			m_free(mb);
 			return NULL;
 		}
@@ -1502,7 +1502,7 @@
 		_mext_init_ref(mb, &cl_refcntmap[cl2ref(mb->m_ext.ext_buf)]);
 	}
 #ifdef MAC
-	if ((flags & M_PKTHDR) && (mac_init_mbuf(mb, MBUF_TO_MALLOC(how))
+	if ((flags & M_PKTHDR) && (mac_init_mbuf(mb, MBTOM(how))
 	    != 0)) {
 		m_free(mb);
 		return NULL;

==== //depot/projects/trustedbsd/mac/sys/sys/mbuf.h#25 (text+ko) ====

@@ -272,7 +272,7 @@
 #define	M_DONTWAIT	0x4		/* don't conflict with M_NOWAIT */
 #define	M_TRYWAIT	0x8		/* or M_WAITOK */
 #define	M_WAIT		M_TRYWAIT	/* XXX: Deprecated. */
-#define	MBUF_TO_MALLOC(how)	((how) == M_TRYWAIT ? M_WAITOK : M_NOWAIT)
+#define	MBTOM(how)	((how) == M_TRYWAIT ? M_WAITOK : M_NOWAIT)
 
 #ifdef _KERNEL
 /*-
To Unsubscribe: send mail to majordomo at trustedbsd.org
with "unsubscribe trustedbsd-cvs" in the body of the message



More information about the trustedbsd-cvs mailing list