summaryrefslogtreecommitdiff
path: root/usr/src/lib/libc/port/threads/assfail.c
diff options
context:
space:
mode:
authorChristopher Siden <chris.siden@delphix.com>2012-05-21 12:11:39 -0700
committerChristopher Siden <chris.siden@delphix.com>2012-05-21 12:11:39 -0700
commitad135b5d644628e791c3188a6ecbd9c257961ef8 (patch)
treef512d6987edc7d3ae208f050b4d6e1440c40186c /usr/src/lib/libc/port/threads/assfail.c
parentdded0839cf719e5b347c41adf4fa9debf68d02d9 (diff)
downloadillumos-joyent-ad135b5d644628e791c3188a6ecbd9c257961ef8.tar.gz
2619 asynchronous destruction of ZFS file systems
2747 SPA versioning with zfs feature flags Reviewed by: Matt Ahrens <mahrens@delphix.com> Reviewed by: George Wilson <gwilson@delphix.com> Reviewed by: Richard Lowe <richlowe@richlowe.net> Reviewed by: Dan Kruchinin <dan.kruchinin@gmail.com> Approved by: Eric Schrock <Eric.Schrock@delphix.com>
Diffstat (limited to 'usr/src/lib/libc/port/threads/assfail.c')
-rw-r--r--usr/src/lib/libc/port/threads/assfail.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/usr/src/lib/libc/port/threads/assfail.c b/usr/src/lib/libc/port/threads/assfail.c
index 8a6440abc2..7cf0ea98e6 100644
--- a/usr/src/lib/libc/port/threads/assfail.c
+++ b/usr/src/lib/libc/port/threads/assfail.c
@@ -23,6 +23,9 @@
* Copyright 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
+/*
+ * Copyright (c) 2012 by Delphix. All rights reserved.
+ */
#include "lint.h"
#include "thr_uberdata.h"
@@ -442,3 +445,19 @@ assfail(const char *assertion, const char *filename, int line_num)
{
__assfail(assertion, filename, line_num);
}
+
+void
+assfail3(const char *assertion, uintmax_t lv, const char *op, uintmax_t rv,
+ const char *filename, int line_num)
+{
+ char buf[1000];
+ (void) strcpy(buf, assertion);
+ (void) strcat(buf, " (0x");
+ ultos((uint64_t)lv, 16, buf + strlen(buf));
+ (void) strcat(buf, " ");
+ (void) strcat(buf, op);
+ (void) strcat(buf, " 0x");
+ ultos((uint64_t)rv, 16, buf + strlen(buf));
+ (void) strcat(buf, ")");
+ __assfail(buf, filename, line_num);
+}