7.7. FRU DATA
IPMI FRU DATA BOOLEAN sets intval IPMI FRU DATA FLOAT sets floatval
IPMI FRU DATA SUB NODE sets sub_node. intval will be -1 if it is not an array, or the array length if it is an array.
Note that if data is returned in data, you must free the data when you are done with ipmi_fru_data_free(). Any of the return values may be passed NULL to ignore the data. Printing all the FRU data or searching for a data item by name can easily be accomplished using recursion.
IPMI-specific FRU Data Interface
The generic interface should be used for applications that only read the FRU data. For applications that also write the data, another interface is available that allows individual data items to be specifically addressed and modified and the data areas of the FRU data to be modified, if they need to be resized, created, or deleted.
IPMI FRU Data Organization fields. The areas are:
FRU data is organized into areas, and the areas are organized into
internal use chassis info board info product info multi record
An area may or may not be present. An area, if present, may have required fields and “custom” fields. The required fields can be fetched by name, the custom fields are fetched by index number. Note that you don’t need to know anything about areas if you are just fetching data from the FRU, but you need to know about them to modify FRU data.
There are a very large number of FRU variables and they are fairly well defined in the IPMI FRU document; see that document and the ipmiif.h include file for details on the FRU data.
Fetching FRU Data from a FRU Each type has its own fetch type. The
Some fields are integers, some are time values, and some are strings. integer and time values only return the one value that is returned.
The string functions have a “type” function, a “len” function, and a function to actually get the strings. For instance:
i p m i _ f r u _ g e t
len(ipmi_entity_t unsigned int
i n t i p m i _ f r u _ g e t _ c h a s s i s _ i n f o _ p a r t _ n u m b e r _ t y p e ( i p m i _ e n t i t y _ t
e n u m i p m i _ s t r _ t y p e _ e * t y p e ) ;
i n t i p m i _ f r u _ g e t _ c h a s s i s _ i n f o _ p a r t _ n u m b e r ( i p m i _ e n t i t y _