109 if (status != NT_SUCCESS)
112 (void)printf(
"\nAdapter %u Product Information", (
unsigned)
adapterNo);
113 (void)printf(
"\n-------------------------------------------\n");
115 (void)printf(
"%-24s : %s\n",
"P/N", pi->
ProductId);
116 (void)printf(
"%-24s : %s\n",
"Serial No", pi->
SerialNo[0]);
117 (void)printf(
"%-24s : %s\n",
"PBA", pi->
PbaId[0]);
118 (void)printf(
"%-24s : %s\n",
"CPLD", pi->
CpldVersion);
119 assert(
sizeof(imageStr) >=
sizeof(pi->
fpgaId1));
122 (void)printf(
"%-24s : %s\n",
"FPGA flash image #0", imageStr);
123 assert(
sizeof(imageStr) >=
sizeof(pi->
fpgaId2));
126 (void)printf(
"%-24s : %s\n",
"FPGA flash image #1", imageStr);
128 (void)printf(
"%-24s : %s\n",
"P/N", pi->
ProductId);
129 (void)printf(
"%-24s : %s\n",
"Main Board Serial No", pi->
SerialNo[0]);
130 (void)printf(
"%-24s : %s\n",
"Main Board PBA", pi->
PbaId[0]);
131 assert(
sizeof(imageStr) >=
sizeof(pi->
AvrId[0]));
132 (void)memcpy(imageStr, pi->
AvrId[0],
sizeof(pi->
AvrId[0]));
134 (void)printf(
"%-24s : %s\n",
"Main Board AVR", imageStr);
135 assert(
sizeof(imageStr) >=
sizeof(pi->
fpgaId1));
138 (void)printf(
"%-24s : %s\n",
"FPGA flash image #0", imageStr);
139 assert(
sizeof(imageStr) >=
sizeof(pi->
fpgaId2));
142 (void)printf(
"%-24s : %s\n",
"FPGA flash image #1", imageStr);
143 (void)printf(
"%-24s : %s\n",
"Front Board Serial No", pi->
SerialNo[1]);
144 (void)printf(
"%-24s : %s\n",
"Front Board PBA", pi->
PbaId[1]);
145 assert(
sizeof(imageStr) >=
sizeof(pi->
AvrId[1]));
146 (void)memcpy(imageStr, pi->
AvrId[1],
sizeof(pi->
AvrId[1]));
148 (void)printf(
"%-24s : %s\n",
"Front Board AVR", imageStr);
150 (void)printf(
"%-24s : %s\n",
"P/N", pi->
ProductId);
151 (void)printf(
"%-24s : %s\n",
"Serial No", pi->
SerialNo[0]);
152 (void)printf(
"%-24s : %s\n",
"PBA", pi->
PbaId[0]);
153 assert(
sizeof(imageStr) >=
sizeof(pi->
AvrId[0]));
154 (void)memcpy(imageStr, pi->
AvrId[0],
sizeof(pi->
AvrId[0]));
156 (void)printf(
"%-24s : %s\n",
"AVR Version", imageStr);
157 assert(
sizeof(imageStr) >=
sizeof(pi->
fpgaId1));
160 (void)printf(
"%-24s : %s\n",
"FPGA flash image #0", imageStr);
161 assert(
sizeof(imageStr) >=
sizeof(pi->
fpgaId2));
164 (void)printf(
"%-24s : %s\n",
"FPGA flash image #1", imageStr);
166 (void)printf(
"%-24s : %s\n",
"P/N", pi->
ProductId);
167 (void)printf(
"%-24s : %s\n",
"Serial No", pi->
SerialNo[0]);
168 (void)printf(
"%-24s : %s\n",
"PBA", pi->
PbaId[0]);
169 (void)printf(
"%-24s : %s\n",
"Firmware id", pi->
AvrId[0]);
173 return NT_ERROR_INTERNAL_ERROR;
191 fprintf(stderr,
"NT_Init() failed: %s\n", errorBuffer);
196 if ((status =
NT_InfoOpen(&hInfoStream,
"ExampleInfo")) != NT_SUCCESS) {
199 fprintf(stderr,
"NT_InfoOpen() failed: %s\n", errorBuffer);
205 if ((status =
NT_InfoRead(hInfoStream, &hInfo)) != NT_SUCCESS) {
208 fprintf(stderr,
"NT_InfoRead() failed: %s\n", errorBuffer);
213 printf(
"The system contains %d adapter(s), %d port(s), and %d NUMA node(s)\n",
219 for (i = 0; i < numAdapters; i++) {
222 if (status != NT_SUCCESS) {
223 if (status == NT_ERROR_VPD_FAILED) {
224 (void)printf(
"Product information does not apply to adapter %u.\n",
229 (void)fprintf(stderr,
"Cannot read product info: %s\n", errorBuffer);
236 if ((status =
NT_InfoRead(hInfoStream, &hInfo)) != NT_SUCCESS) {
239 fprintf(stderr,
"NT_InfoRead() failed: %s\n", errorBuffer);
244 printf(
"\n%-24s : %04X:%04X : %04X:%02X:%02X.%X \n",
255 if ((status =
NT_InfoClose(hInfoStream)) != NT_SUCCESS) {
258 fprintf(stderr,
"NT_InfoClose() failed: %s\n", errorBuffer);