From owner-svn-src-stable@FreeBSD.ORG Wed Apr 14 17:17:06 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 74962106566C; Wed, 14 Apr 2010 17:17:06 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6394C8FC21; Wed, 14 Apr 2010 17:17:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3EHH6FB035484; Wed, 14 Apr 2010 17:17:06 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3EHH6DZ035482; Wed, 14 Apr 2010 17:17:06 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201004141717.o3EHH6DZ035482@svn.freebsd.org> From: John Baldwin Date: Wed, 14 Apr 2010 17:17:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206611 - stable/8/lib/libstand X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Apr 2010 17:17:06 -0000 Author: jhb Date: Wed Apr 14 17:17:06 2010 New Revision: 206611 URL: http://svn.freebsd.org/changeset/base/206611 Log: MFC 205900: Use panic() (which the environment is required to provide to libstand) to implement assert() instead of relying on a non-required exit(). The exit() invocation also did not match the semantics of the exit() routine that current boot environments happen to require. Modified: stable/8/lib/libstand/assert.c Directory Properties: stable/8/lib/libstand/ (props changed) Modified: stable/8/lib/libstand/assert.c ============================================================================== --- stable/8/lib/libstand/assert.c Wed Apr 14 17:01:29 2010 (r206610) +++ stable/8/lib/libstand/assert.c Wed Apr 14 17:17:06 2010 (r206611) @@ -35,10 +35,10 @@ void __assert(const char *func, const char *file, int line, const char *expression) { if (func == NULL) - printf("Assertion failed: (%s), file %s, line %d.\n", + panic("Assertion failed: (%s), file %s, line %d.\n", expression, file, line); else - printf("Assertion failed: (%s), function %s, file %s, line " - "%d.\n", expression, func, file, line); - exit(); + panic( + "Assertion failed: (%s), function %s, file %s, line %d.\n", + expression, func, file, line); }