Sun Microsystems Netra CP2500 Programming Manual page 24

For the solaris operating system
Table of Contents

Advertisement

System Watchdog Node Management Code Example (Continued)
CODE EXAMPLE 1-1
*/
static picl_errno_t
print_watchdog_node_props(picl_nodehdl_t nodeh)
{
int32_t *timeout = NULL;
char
if (wdadm_get_picl_prop(nodeh, WATCHDOG_TIMEOUT,
}
if (wdadm_get_picl_prop(nodeh, WATCHDOG_STATUS,
}
if (wdadm_get_picl_prop(nodeh, WATCHDOG_ACTION,
}
(void) printf(PRINT_FORMAT, status, action, *timeout);
free(status);
free(timeout);
free(action);
return (PICL_SUCCESS);
}
/*
* This function is the callback function that gets called
* due to picl_walk_tree_by_class call from print_wd_info function.
* This function traveses all the watchdog-timer nodes under the given
* controller and makes a call to print_watchdog_node_props to print
* the watchdog properties
*/
static int
wd_printf_info(picl_nodehdl_t nodeh, void *args)
{
int err = PICL_SUCCESS;
int print = 0, i = 0;
10
Netra CP2500 Board Programming Guide • March 2007
*action = NULL, *status = NULL;
(void **)&timeout) != PICL_SUCCESS) {
free(timeout);
return (PICL_FAILURE);
(void **)&status) != PICL_SUCCESS) {
free(status);
free(timeout);
return (PICL_FAILURE);
(void **)&action) != PICL_SUCCESS) {
free(status);
free(timeout);
free(action);
return (PICL_FAILURE);

Advertisement

Table of Contents
loading

Table of Contents