Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Feb 2013 11:23:06 -0800
From:      Adrian Chadd <adrian@freebsd.org>
To:        John Baldwin <jhb@freebsd.org>
Cc:        Kirk McKusick <mckusick@mckusick.com>, Christoph Mallon <christoph.mallon@gmx.de>, Andriy Gapon <avg@freebsd.org>, freebsd-arch@freebsd.org
Subject:   Re: Proposal: Unify printing the function name in panic messages()
Message-ID:  <CAJ-Vmo=wwFD7_OF%2BFdJkPyxjQD_4y-yBU6guUHTuCkFr%2BoYh-w@mail.gmail.com>
In-Reply-To: <201302131038.57250.jhb@freebsd.org>
References:  <201302120134.r1C1Ycfh026347@chez.mckusick.com> <201302131038.57250.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
... I hate to be a jerk, but something tells me that relying on the
output of text strings as to the panic cause and then parsing those is
maybe not the right thing to do.

If it were me, I'd do something like the gettext string API - ie,
panic wouldn't take a string, but a panic string ID, which would
translate to an enum as well as map to a string.. then you could pull
that off.



Adrian



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-Vmo=wwFD7_OF%2BFdJkPyxjQD_4y-yBU6guUHTuCkFr%2BoYh-w>