mkb@rover.ri.cmu.edu (Mike Blackwell) (01/09/90)
For a given Nubus slot, how do I access the name of the board (as stored in the configuration ROM)? I would guess it's in a slot resource, accessable by SGetCString(), but I don't have Designing Cards and Drivers so I don't know which one or where (and IM5 is no help). If you have a code fragment, or even a hint, I would be most obliged. cheers, -m- mkb@rover.ri.cmu.edu
amanda@mermaid.intercon.com (Amanda Walker) (01/09/90)
In article <7492@pt.cs.cmu.edu>, mkb@rover.ri.cmu.edu (Mike Blackwell) writes: > For a given Nubus slot, how do I access the name of the board (as stored in > the configuration ROM)? I would guess it's in a slot resource, accessable by > SGetCString(), but I don't have Designing Cards and Drivers so I don't know > which one or where (and IM5 is no help). If you have a code fragment, or > even a hint, I would be most obliged. Here's my standard Slot Manager demo program. It compiles into an MPW tool (MPW C 3.0): #include <stdio.h> #include <slots.h> #include <ROMDefs.h> main() { int i; SpBlock spb; long l; for (i = 9; i < 16; i++) { spb.spSlot = i; spb.spID = 1; spb.spExtDev = 0; if (!SRsrcInfo(&spb)) { printf("Slot %d:\n", i); spb.spID = sRsrcName; if (!SGetCString(&spb)) { printf(" %s\n", (char *) spb.spResult); } spb.spID = vendorInfo; if (!SFindStruct(&spb)) { spb.spID = vendorId; if (!SGetCString(&spb)) { printf(" Vendor: %s\n", (char *) spb.spResult); } spb.spID = serialNum; if (!SGetCString(&spb)) { printf(" Serial Number: %s\n", (char *) spb.spResult); } spb.spID = revLevel; if (!SGetCString(&spb)) { printf(" Revision: %s\n", (char *) spb.spResult); } spb.spID = partNum; if (!SGetCString(&spb)) { printf(" Part Number: %s\n", (char *) spb.spResult); } spb.spID = date; if (!SGetCString(&spb)) { printf(" Revision Date: %s\n", (char *) spb.spResult); } } } } } Enjoy, Amanda Walker InterCon Systems Corporation --