Author: avg Date: Wed Sep 13 10:34:31 2017 New Revision: 323528 URL: https://svnweb.freebsd.org/changeset/base/323528
Log: MFV r323527: 5815 libzpool's panic function doesn't set global panicstr, ::status not as useful illumos/illumos-gate@fae6347731c9d3f46b26338313b0422927f29cf6 https://github.com/illumos/illumos-gate/commit/fae6347731c9d3f46b26338313b0422927f29cf6 https://www.illumos.org/issues/5815 When panic() is called from within ztest, the mdb ::status command isn't as useful as it could be since the global panicstr variable isn't updated. We should modify the function to make sure panicstr is set, so ::status can present the error message just like it does on a failed assertion. Reviewed by: Matthew Ahrens <mahr...@delphix.com> Reviewed by: Sebastien Roy <sebastien....@delphix.com> Reviewed by: Gordon Ross <gordon.r...@nexenta.com> Reviewed by: Rich Lowe <richl...@richlowe.net> Approved by: Dan McDonald <dan...@omniti.com> Author: Prakash Surya <prakash.su...@delphix.com> MFC after: 4 weeks Modified: head/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) Modified: head/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c Wed Sep 13 10:33:09 2017 (r323527) +++ head/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c Wed Sep 13 10:34:31 2017 (r323528) @@ -735,11 +735,9 @@ static char ce_suffix[CE_IGNORE][2] = { "", "\n", "\n" void vpanic(const char *fmt, va_list adx) { - (void) fprintf(stderr, "error: "); - (void) vfprintf(stderr, fmt, adx); - (void) fprintf(stderr, "\n"); - - abort(); /* think of it as a "user-level crash dump" */ + char buf[512]; + (void) vsnprintf(buf, 512, fmt, adx); + assfail(buf, NULL, 0); } void _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"