Hii all,
below code will reset the system,
please tell below code correct (or) wrong.
//mycode.c
ipmi_domain_iterate_entities(domain, handle_reset, tmp_obj);
void handle_reset(ipmi_entity_t *entity, void *cb_data)
{
printf(\"Inside the handle_reset\\n\");
int entity_id;
entity_id = ipmi_entity_get_entity_id(entity);
if(entity_id == IPMI_ENTITY_ID_SYSTEM_CHASSIS)
{
ipmi_entity_iterate_controls(entity,handle_reset_control,tmp_obj);
}
void
handle_reset_control(ipmi_entity_t *entity, ipmi_control_t *control, void
*cb_data)
{
printf(\"Inside the handle_reset_control\\n\");
int control_type;
control_type = ipmi_control_get_type(control);
if(control_type == IPMI_CONTROL_ONE_SHOT_RESET)
{
int rv;
int val =1;
rv = ipmi_control_set_val(control, &val, NULL, NULL);
if(rv)
{
printf(\"Error:setting the one_shot_reset control\\n\");
}
}
}
}
Thanks,
barani
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Openipmi-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openipmi-developer