[OpenAFS-devel] Re: osi_Panic on AIX and IRIX

Chas Williams (CONTRACTOR) chas@cmf.nrl.navy.mil
Tue, 09 Feb 2010 21:30:29 -0500


In message <20100209142550.350695c6.adeason@sinenomine.net>,Andrew Deason writes:
>On those platforms, it looks like osi_Panic should be decl'd
>'osi_Panic(char *msg, void *a1, void *a2, void *a3)', and should be
>defined to effectively printf(msg, a1, a2, a3). There should be no
>vprintf in osi_Panic, and I can't see how it could get in there,
>assuming AFS_AIX_ENV and AFS_SGI_ENV are the right symbols.

do we have kernels (or userspaces) that do not support stdargs/varargs
in some fashion?

>> Well, I don't know how well it's working out for AIX, but now I'm
>> playing wack-a-mole #ifdefing all of the osi_Panic refs elsewhere.
>
>That's definitely not what you want to do. Panics still need to panic,
>right?

osi_Panic() needs to panic and perhaps it should be an ifdef or
static inline.  on linux, osi_Panic() called the kernel panic routine()
which prints the file/line number.  however, it always pointed to the
osi_Panic() routine instead of where osi_Panic() was located.  so perhaps
for consistency it should be this way everywhere just in case someone
else does the same thing.