Sun Microsystems Netra CP2500 Programming Manual page 27

For the solaris operating system
Table of Contents

Advertisement

System Watchdog Node Management Code Example (Continued)
CODE EXAMPLE 1-1
}
return (err);
}
/*
* This function is the callback function that gets called
* due to picl_walk_tree_by_class call from set_wd_params function.
* This function checks if the given controller node has the watchdog-timer
* of interest and then changes the timeout and action of that timer.
*/
static int
wd_set_params(picl_nodehdl_t nodeh, void *args)
{
int err = PICL_SUCCESS;
char
char cntrl_name[PICL_PROPNAMELEN_MAX];
char wd_name[PICL_PROPNAMELEN_MAX];
picl_nodehdl_t childh, peerh;
wdadm_args_t
char
wd_arg = (wdadm_args_t *)args;
if (wd_arg == NULL || wd_arg->name == NULL)
/* get the name of the controller */
err = picl_get_propval_by_name(nodeh, PICL_PROP_NAME,
if (err != PICL_SUCCESS) {
}
/*
* name is of cntrl:node_name format (user input)
* do the parsing to extract controller name and watchdog-timer
* name
*/
ptr = strchr(wd_arg->name, ':');
if (ptr == NULL) {
}
/* check if the controller is of interest */
*ptr = NULL;
*wd_arg = NULL;
*status = NULL;
return (PICL_WALK_TERMINATE);
(void *)cntrl_name, PICL_PROPNAMELEN_MAX);
print_errmsg(gettext(err_msg[EM_GETPVALBYNAME]),
picl_strerror(err));
return (err);
(void) fprintf(stderr, "%s:Node not found:%d\n",
prog, picl2errno(PICL_NODENOTFOUND));
return (PICL_NODENOTFOUND);
Chapter 1 Watchdog Timer
13

Advertisement

Table of Contents
loading

Table of Contents