Date: Tue, 7 Oct 2014 14:15:50 +0000 (UTC) From: Andriy Gapon <avg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272701 - head/sys/cddl/compat/opensolaris/sys Message-ID: <201410071415.s97EFoTC012416@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: avg Date: Tue Oct 7 14:15:50 2014 New Revision: 272701 URL: https://svnweb.freebsd.org/changeset/base/272701 Log: make userland __assfail from opensolaris compat honor 'aok' variable This should allow zdb -A option to actually make difference. MFC after: 2 weeks Modified: head/sys/cddl/compat/opensolaris/sys/assfail.h Modified: head/sys/cddl/compat/opensolaris/sys/assfail.h ============================================================================== --- head/sys/cddl/compat/opensolaris/sys/assfail.h Tue Oct 7 14:09:05 2014 (r272700) +++ head/sys/cddl/compat/opensolaris/sys/assfail.h Tue Oct 7 14:15:50 2014 (r272701) @@ -46,20 +46,24 @@ void assfail3(const char *, uintmax_t, c #else /* !defined(_KERNEL) */ #ifndef HAVE_ASSFAIL +extern int aok; + static __inline int __assfail(const char *expr, const char *file, int line) { (void)fprintf(stderr, "Assertion failed: (%s), file %s, line %d.\n", expr, file, line); - abort(); - /* NOTREACHED */ + if (!aok) + abort(); return (0); } #define assfail __assfail #endif #ifndef HAVE_ASSFAIL3 +extern int aok; + static __inline void __assfail3(const char *expr, uintmax_t lv, const char *op, uintmax_t rv, const char *file, int line) { @@ -67,8 +71,8 @@ __assfail3(const char *expr, uintmax_t l (void)fprintf(stderr, "Assertion failed: %s (0x%jx %s 0x%jx), file %s, line %d.\n", expr, lv, op, rv, file, line); - abort(); - /* NOTREACHED */ + if (!aok) + abort(); } #define assfail3 __assfail3 #endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410071415.s97EFoTC012416>