X hits on this document

PDF document

February 10, 2006 - page 125 / 238

653 views

0 shares

0 downloads

0 comments

125 / 238

unsigned int

area,

unsigned int

*offset);

_ _ _ _ int ipmi fru area_get length(ipmi_fru t

*fru,

unsigned int

area,

unsigned int

*length);

7.7. FRU DATA

113

T h e u s e d _ l e n g t h v a r i a b l e t e l l s h o w m u c h o f t h e l e n g t h o f t h e F R U i s a c t u a l l y u s e d . N o t e t h a t a r e a o ff s e t s

and length must be multiples of 8. To change the value of a field, you will use functions of the form:

i n t i p m i _ f r u _ a r e a _ g e t _ u s e d _ l e n g t h ( i p m i _ f r u _ t unsigned int area, unsigned int *used_length); * f r u ,

after the area. OpenIPMI will not rearrange the areas to make space, you have to do that yourself. So you may have to change the offset of an area (and other areas) to make space. The following functions are for

unsigned int area, unsigned int offset, unsigned int length);

*fru, area, offset); *fru, area, length);

_ _ _ int ipmi fru delete_area(ipmi_fru t *fru,

int area);

_ _ _ int ipmi fru area_get_offset(ipmi fru_t

*fru,

working with areas: i n t i p m i _ f r u _ a d d _ a r e a ( i p m i _ f r u _ t

*fru,

i n t i p m i _ f r u _ a r e a _ s e t _ o f f s e t ( i p m i _ f r u _ t i unsigned int unsigned int n t i p m i _ f r u _ a r e a _ s e t _ l e n g t h ( i p m i _ f unsigned int unsigned int r u _ t

unsigned int

num,

_ enum ipmi str_type_e type,

char

*str,

unsigned int

len);

These set the fields to the given values. If you set a required field to a NULL string, it will clear the value of the string. If you set a multi-record or custom string to a NULL string, it will delete the record at the given number.

i n t i p m i _ f r u _ s e t _ c h a s s i s _ i n f o _ c u s t o m ( i p m i _ f r u _ t

*fru,

*entity,

Like the ipmi_fru_get function, the following functions allow setting FRU variables by index:

int ipmi_fru_set_chassis_info_type(ipmi_entity_t *entity, unsigned char type); i n t i p m i _ e n t i t y _ s 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 _ t

enum ipmi_str_type char unsigned int

_

e *type); *str, strlen);

i n t i p m i _ f r u _ s e t _ i n t _ v a l ( i p m i _ f r u _ t * f r u ,

int

index,

Document info
Document views653
Page views653
Page last viewedFri Dec 09 06:29:05 UTC 2016
Pages238
Paragraphs8090
Words85809

Comments