Date: Thu, 7 Feb 2013 22:47:26 +0100 From: Hans Petter Selasky <hselasky@c2i.net> To: freebsd-arch@freebsd.org Cc: Kirk McKusick <mckusick@mckusick.com>, Christoph Mallon <christoph.mallon@gmx.de> Subject: Re: Proposal: Unify printing the function name in panic messages() Message-ID: <201302072247.26167.hselasky@c2i.net> In-Reply-To: <51141E33.4080103@gmx.de> References: <51141E33.4080103@gmx.de>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday 07 February 2013 22:35:47 Christoph Mallon wrote: > Hi, > Hi, > /* > * Panic and automatically prepend the name of the function to the panic > * message. If NAMED_PANIC is not set, the name is omitted. > */ > #ifdef NAMED_PANIC > # define PANIC(fmt, ...) panic("%s: " fmt, __func__, ##__VA_ARGS__) > #else > # define PANIC(fmt) panic(__VA_ARGS__) > #endif > You mean: #define PANIC(...) panic(__VA_ARGS__) > > Do you have suggestions to improve this proposal? Why not make two variants to avoid the #ifdef ? PANIC_NAMED(fmt, ...) and PANIC(...) --HPS
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201302072247.26167.hselasky>