Date: Sun, 30 Dec 2007 02:51:35 GMT From: John Birrell <jb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 132011 for review Message-ID: <200712300251.lBU2pZIU076409@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=132011 Change 132011 by jb@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 }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200712300251.lBU2pZIU076409>