make userland __assfail from opensolaris compat honor 'aok' variable
This should allow zdb -A option to actually make difference. MFC after: 2 weeks
This commit is contained in:
parent
9ef268219a
commit
ab26525af2
@ -46,20 +46,24 @@ void assfail3(const char *, uintmax_t, const char *, uintmax_t, const char *,
|
|||||||
#else /* !defined(_KERNEL) */
|
#else /* !defined(_KERNEL) */
|
||||||
|
|
||||||
#ifndef HAVE_ASSFAIL
|
#ifndef HAVE_ASSFAIL
|
||||||
|
extern int aok;
|
||||||
|
|
||||||
static __inline int
|
static __inline int
|
||||||
__assfail(const char *expr, const char *file, int line)
|
__assfail(const char *expr, const char *file, int line)
|
||||||
{
|
{
|
||||||
|
|
||||||
(void)fprintf(stderr, "Assertion failed: (%s), file %s, line %d.\n",
|
(void)fprintf(stderr, "Assertion failed: (%s), file %s, line %d.\n",
|
||||||
expr, file, line);
|
expr, file, line);
|
||||||
abort();
|
if (!aok)
|
||||||
/* NOTREACHED */
|
abort();
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
#define assfail __assfail
|
#define assfail __assfail
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_ASSFAIL3
|
#ifndef HAVE_ASSFAIL3
|
||||||
|
extern int aok;
|
||||||
|
|
||||||
static __inline void
|
static __inline void
|
||||||
__assfail3(const char *expr, uintmax_t lv, const char *op, uintmax_t rv,
|
__assfail3(const char *expr, uintmax_t lv, const char *op, uintmax_t rv,
|
||||||
const char *file, int line) {
|
const char *file, int line) {
|
||||||
@ -67,8 +71,8 @@ __assfail3(const char *expr, uintmax_t lv, const char *op, uintmax_t rv,
|
|||||||
(void)fprintf(stderr,
|
(void)fprintf(stderr,
|
||||||
"Assertion failed: %s (0x%jx %s 0x%jx), file %s, line %d.\n",
|
"Assertion failed: %s (0x%jx %s 0x%jx), file %s, line %d.\n",
|
||||||
expr, lv, op, rv, file, line);
|
expr, lv, op, rv, file, line);
|
||||||
abort();
|
if (!aok)
|
||||||
/* NOTREACHED */
|
abort();
|
||||||
}
|
}
|
||||||
#define assfail3 __assfail3
|
#define assfail3 __assfail3
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user