summaryrefslogtreecommitdiffstats
path: root/lib/libstand
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2010-03-30 19:07:41 +0000
committerjhb <jhb@FreeBSD.org>2010-03-30 19:07:41 +0000
commitb82a4c003c3dc906ba00076ec7902ea35165ed04 (patch)
treefb90396bf2495e80a99252ac20664c1beb8972a3 /lib/libstand
parent5bba6cc028d8ca1d72fadfd8cd906007acbc202d (diff)
downloadFreeBSD-src-b82a4c003c3dc906ba00076ec7902ea35165ed04.zip
FreeBSD-src-b82a4c003c3dc906ba00076ec7902ea35165ed04.tar.gz
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. PR: kern/144749 Discussed with: bde MFC after: 1 week
Diffstat (limited to 'lib/libstand')
-rw-r--r--lib/libstand/assert.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libstand/assert.c b/lib/libstand/assert.c
index b424358..8eec63a 100644
--- a/lib/libstand/assert.c
+++ b/lib/libstand/assert.c
@@ -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);
}
OpenPOWER on IntegriCloud