X hits on this document

PDF document

February 10, 2006 - page 201 / 238

563 views

0 shares

0 downloads

0 comments

201 / 238

}

static void got_thresh_reading(ipmi sensor t int

_

_

*sensor, err,

enum ipmi value_present e value_present,

_

_

unsigned int double ipmi_states t void

_

raw_value, val, *states, *cb_data)

{

sdata t

_

* s d a t a = c b _ d a t a ;

e n u m i p m i _ t h r e s h _ e t h r e s h ;

if (err) { printf("Error 0x%x getting discrete states for sensor %s\n", err, sdata->name); goto out;

}

printf("Got threshold reading for sensor %s\n", sdata->name); if (ipmi_is_event_messages_enabled(states))

printf("

event

messages

enabled\n");

if

( i p m i _ i s _ s e n s o r _ s c a n n i n g _ e n a b l e d ( s t a t e s ) )

printf("

sensor

scanning

enabled\n");

if

( i p m i _ i s _ i n i t i a l _ u p d a t e _ i n _ p r o g r e s s ( s t a t e s ) )

printf("

initial

update

in

progress\n");

switch (value_present) {

case IPMI_NO printf(" break;

_

VALUES_PRESENT: no value present\n");

case IPMI BOTH VALUES PRESENT:

_

_

_

{

const const const const const

char *percent = ""; char *base; char *mod_use = ""; char *modifier = ""; char *rate;

base = ipmi_sensor_get_base_unit_string(sensor); if (ipmi_sensor_get_percentage(sensor))

percent = "%"; s w i t c h ( i p m i _ s e n s o r _ g e t _ m o d i f i e r _ u n i t _ u s e ( s e n s o r ) ) { c a s e I P M I _ M O D I F I E R _ U N I T _ N O N E :

189

Document info
Document views563
Page views563
Page last viewedMon Dec 05 03:28:00 UTC 2016
Pages238
Paragraphs8090
Words85809

Comments