X hits on this document

PDF document

February 10, 2006 - page 212 / 238

550 views

0 shares

0 downloads

0 comments

212 / 238

200

}

APPENDIX I. SAMPLE PROGRAM SHOWING EVENT SETUP

p r i n t f ( " i p m i _ s m i _ s e t u p _ c o n : U n a b l e t o a l l o c a t e o s h a n d l e r \ n " ) ; exit(1);

}

/* Use the default log handler. */

/* Initialize the OpenIPMI library. */ ipmi_init(os_hnd);

rv = ipmi_parse_args(&curr_arg, argc, argv, &args); if (rv) { fprintf(stderr, "Error parsing command arguments, argument %d: %s\n", curr_arg, strerror(rv)); usage(); exit(1);

}

rv = ipmi_args_setup_con(args, os_hnd, NULL, &con); if (rv) {

fprintf(stderr, "ipmi_ip_setup_con: %s", strerror(rv)); exit(1);

}

r v = i p m i _ o p e n _ d o m a i n ( " "

, &con, 1, setup_done, NULL, NULL, NULL,

NULL, 0, NULL);

if (rv) { fprintf(stderr

,

" i p m i _ i n i t _ d o m a i n : % s \ n " , s t r e r r o r ( r v ) ) ;

exit(1);

}

/* This is the main loop of the event-driven program.

Try <CTRL-C> to exit the program */ /* Let the selector code run the select loop. */ o s _ h n d - > o p e r a t i o n _ l o o p ( o s _ h n d ) ;

/* Technically, we can’t get here, but this is an example. */ o s _ h n d - > f r e e _ o s _ h a n d l e r ( o s _ h n d ) return 0; ;

Document info
Document views550
Page views550
Page last viewedSun Dec 04 13:30:33 UTC 2016
Pages238
Paragraphs8090
Words85809

Comments