X hits on this document

PDF document

February 10, 2006 - page 189 / 238

529 views

0 shares

0 downloads

0 comments

189 / 238

const char

*name;

unsigned int

i;

int

j;

_ _ enum ipmi fru data_type_e dtype;

int

intval, rv;

time_t

time;

double

floatval;

char

*data;

unsigned int

_ data len;

ipmi_fru_node_t

_ *sub node;

}

static int t r a v e r s e _ f r u _ n o d e _ t r e e ( i n t i n d e n t , i p m i _ f r u _ n o d e _ t * n o d e )

{

for (i=0; ; i++) { data = NULL; r v = i p m i _ f r u _ n o d e _ g e t _ f i e l d ( n o d e , i , & n a m e , & d t y p e , & i n t v a l , & t i m e , & f l o a t v a l , & d a t a , & d a t a _ l e n , & s u b _ n o d e if (rv == EINVAL) break; else if (rv) continue; ) ;

printf("%*s[%d]: "

, indent,

switch (dtype) { c a s e I P M I _ F R U _ D A T A _ I N T :

, name);

"", i);

}

""

if (name)

if (ipmi_sensor_get_event_reading_type(sensor) == IPMI_EVENT_READING_TYPE_THRESHOLD) rv = ipmi_sensor_add_threshold_event_handler (sensor, s e n s o r _ t h r e s h o l d _ e v e n t _ h a n d l e NULL); r ,

else

r v = i p m i _ s e n s o r _ a d d _ d i s c r e t e _ e v e n t _ h a n d l (sensor, e r s e n s o r _ d i s c r e t e _ e v e n t _ h a n d NULL); if (rv) printf("Unable to add the sensor event handler: %x\n", rv); l e r ,

printf("%*s%s: " else

, indent,

177

Document info
Document views529
Page views529
Page last viewedSat Dec 03 18:30:32 UTC 2016
Pages238
Paragraphs8090
Words85809

Comments