[OpenAFS-devel] osi_Panic on AIX and IRIX

Chaz Chandler clc31@inbox.com
Tue, 09 Feb 2010 15:00:37 -0500


>> Some recent changes to rx_prototypes.h have raised a new question about
>> how to handle osi_Panic on AIX and IRIX, which don't have vprintf in the
>> kernel.  (Though IRIX, at least, does have vprintf in libc.)
>>
>> Here's where osi_Panic's non-vararg version is being declared in
>> rx_prototypes.h:
>> ...
>> =23 elif (defined(AFS_AIX_ENV) && =21defined(AFS_AIX61_ENV)) =7C=7C
>> defined(AFS_SGI_ENV)
>> extern void osi_Panic(char *fmt, void *a1, void *a2, void *a3);
>> ...
>>
>> This is causing issues throughout the code where osi_Panic is assumed to
>> be va-capable (mostly in src/afs and src/rx).  While I could go through
>> and =23ifdef every reference, I'm hoping someone might have a more =
elegant
>> solution.
>>    =20
> I think the best solution here is just to remove the prototype from the =
definition. We've already done that in a number of places - so we'd have
>
> extern void osi_Panic();
>
> for those platforms. This is what the code was originally, before I =
started attacking it with a liberal scattering of prototypes.
>
> S

I could be misunderstanding you, but I don't think the issue is with the
prototype, per se.

I'm not sure exactly what led to it, but at some point before late
January references to vprintf crept into the IRIX kernel module because
of the way osi_Panic was defined -- at which point the module would no
longer load (and the kernel would no longer build with libafs.a in it).=20
It looked like AIX had the same problem (lack of vprintf) and there was
already some =23ifdef code in there to work around it, so we just tacked
on some more for IRIX.  Well, I don't know how well it's working out for
AIX, but now I'm playing wack-a-mole =23ifdefing all of the osi_Panic refs
elsewhere.  I'm hoping there's a better way.  Has anyone tested AIX
recently?

-C

____________________________________________________________
GET FREE 5GB EMAIL - Check out spam free email with many cool features=21
Visit http://www.inbox.com/email to find out more=21