X hits on this document

PDF document

February 10, 2006 - page 190 / 238

521 views

0 shares

0 downloads

0 comments

190 / 238

178

APPENDIX H. SAMPLE PROGRAM SHOWING BASIC OPERATIONS

printf("(integer) %d\n", intval); break;

case IPMI_FRU_DATA_TIME: printf("(integer) %ld\n", (long) time); break;

case IPMI_FRU_DATA_BINARY: printf("(binary)"); for (j=0; j<data_len; j++) printf(" %2.2x", data[i]); printf("\n"); break;

case IPMI_FRU_DATA_UNICODE: printf("(unicode)"); for (j=0; j<data_len; j++) printf(" %2.2x", data[i]); printf("\n"); break;

case IPMI_FRU_DATA_ASCII: printf("(ascii) \"%s\"\n", data); break;

case IPMI_FRU_DATA_BOOLEAN: printf("(boolean) \"%s\"\n", intval ? "true" : "false"); break;

case IPMI_FRU_DATA_FLOAT: printf("(float) %f\n", floatval); break;

case IPMI_FRU_DATA_SUB_NODE: if (intval == -1) printf("(record)\n"); else printf("(array) %d\n", intval); t r a v e r s e _ f r u _ n o d e _ t r e e ( i n d e n t + 2 , s u b _ n o d e ) break; ;

default: printf("(unknown)"); break;

}

Document info
Document views521
Page views521
Page last viewedSat Dec 03 10:46:29 UTC 2016
Pages238
Paragraphs8090
Words85809

Comments