From owner-svn-src-all@FreeBSD.ORG Mon Nov 17 13:26:29 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7323D711; Mon, 17 Nov 2014 13:26:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5F1CF379; Mon, 17 Nov 2014 13:26:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAHDQTuh058645; Mon, 17 Nov 2014 13:26:29 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAHDQTMw058644; Mon, 17 Nov 2014 13:26:29 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201411171326.sAHDQTMw058644@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 17 Nov 2014 13:26:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r274622 - stable/9/sys/cddl/compat/opensolaris/sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2014 13:26:29 -0000 Author: avg Date: Mon Nov 17 13:26:28 2014 New Revision: 274622 URL: https://svnweb.freebsd.org/changeset/base/274622 Log: MFC r272701: make userland __assfail from opensolaris compat honor 'aok' variable Modified: stable/9/sys/cddl/compat/opensolaris/sys/assfail.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cddl/compat/opensolaris/sys/assfail.h ============================================================================== --- stable/9/sys/cddl/compat/opensolaris/sys/assfail.h Mon Nov 17 12:36:01 2014 (r274621) +++ stable/9/sys/cddl/compat/opensolaris/sys/assfail.h Mon Nov 17 13:26:28 2014 (r274622) @@ -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