PERFORCE change 132011 for review

John Birrell jb at FreeBSD.org
Sat Dec 29 18:51:36 PST 2007


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

Change 132011 by jb at jb_freebsd1 on 2007/12/30 02:50:45

	gcc doesn't like inlined functions containing varargs.
	
	The code was ZFS specific too. We'll have a proper (OpenSolaris 
	compatible) function in the opensolaris module that we can all
	share and live happily ever after together with.

Affected files ...

.. //depot/projects/dtrace/src/sys/compat/opensolaris/sys/cmn_err.h#2 edit

Differences ...

==== //depot/projects/dtrace/src/sys/compat/opensolaris/sys/cmn_err.h#2 (text+ko) ====

@@ -44,44 +44,7 @@
 #define	CE_PANIC	3	/* panic		*/
 #define	CE_IGNORE	4	/* print nothing	*/
 
-static __inline void
-vcmn_err(int ce, const char *fmt, va_list adx)
-{
-	char buf[256];
-
-	switch (ce) {
-	case CE_CONT:
-		snprintf(buf, sizeof(buf), "ZFS(cont): %s\n", fmt);
-		break;
-	case CE_NOTE:
-		snprintf(buf, sizeof(buf), "ZFS: NOTICE: %s\n", fmt);
-		break;
-	case CE_WARN:
-		snprintf(buf, sizeof(buf), "ZFS: WARNING: %s\n", fmt);
-		break;
-	case CE_PANIC:
-		snprintf(buf, sizeof(buf), "ZFS(panic): %s\n", fmt);
-		break;
-	case CE_IGNORE:
-		break;
-	default:
-		panic("unknown severity level");
-	}
-	if (ce != CE_IGNORE)
-		vprintf(buf, adx);
-	if (ce == CE_PANIC)
-		panic("ZFS");
-}
-
-static __inline void
-cmn_err(int ce, const char *fmt, ...)
-{
-	va_list adx;
-
-	va_start(adx, fmt);
-	vcmn_err(ce, fmt, adx);
-	va_end(adx);
-}
+void cmn_err(int, const char *, ...);
 
 #ifdef	__cplusplus
 }


More information about the p4-projects mailing list