I'm running vxWorks 6.6 on a PPC target. I want to access the "Target
Name" (tn=XXX) parameter supplied to the kernel on the vxWorks
bootline. Is there an API that I can call to retrieve this
information? If it matters, the code making this API call would be
inside an RTP.
How do I do it?
bootLib's functions bootStringToStruct() is what you need.
#include "bootLib.h
#define BOOT_LINE_ADRS ( 0x4200 )
BOOT_PARAMS bootParams;
bootStringToStruct ( (char *)BOOT_LINE_ADRS, &bootParams );
sprintf ( stdout, "target name = \"%s\"\n", bootParams.targetName );
--
========================================================================
Michael Kesti | "And like, one and one don't make
| two, one and one make one."
mrkesti at hotmail dot com | - The Who, Bargain
>bootLib's functions bootStringToStruct() is what you need.
Thank you - I knew it would be simple!
<grin>
>Fred wrote:
>> I'm sure it's something simple, but for the life of me I can't find it
>> in the Wind River documentation.
>>
>> I'm running vxWorks 6.6 on a PPC target. I want to access the "Target
>> Name" (tn=XXX) parameter supplied to the kernel on the vxWorks
>> bootline. Is there an API that I can call to retrieve this
>> information? If it matters, the code making this API call would be
>> inside an RTP.
>>
>> How do I do it?
>
>bootLib's functions bootStringToStruct() is what you need.
Just a quick followup: this function did the trick, but it's only
available from kernel code, not from an RTP. The workaround is an easy
one: I retrieved the target name prior to launching the RTP, and
passed the target name in the RTP's argument vector.