Sun Microsystems Netra CP2500 Programming Manual page 31

For the solaris operating system
Table of Contents

Advertisement

System Watchdog Node Management Code Example (Continued)
CODE EXAMPLE 1-1
}
/*
* check to see if the controller is of interest, otherwise
* move to the next controller.
*/
if (strcmp(cntrl_name, wd_arg->name) != 0) {
}
count++;
/* change the watchdog-controller's WdOp property */
if ((err = wdadm_set_picl_prop(nodeh, WATCHDOG_OP,
}
return (err);
}
/*
* Function is used to disarm/arm the watchdog controller
*/
static int
control_wd(char *cntrl_name, char *op)
{
wdadm_args_t
int err = PICL_SUCCESS;
if (cntrl_name == NULL || op == NULL) {
}
wd_arg.name = cntrl_name;
wd_arg.op = op;
wd_arg.error_code = 1;
err = picl_walk_tree_by_class(rooth, PICL_WATCHDOG_CONTROLLER,
if (count == 0) {
}
print_errmsg(gettext(err_msg[EM_GETPVALBYNAME]),
picl_strerror(err));
return (err);
return (PICL_WALK_CONTINUE);
wd_arg->op, strlen(wd_arg->op) + 1)) != PICL_SUCCESS) {
(void) fprintf(stderr, "%s:Failed:%d\n", prog,
wd_arg;
(void) fprintf(stderr, "%s:Invalid arguments\n", prog);
return (PICL_INVALIDARG);
(void
*)&wd_arg, wd_change_state);
(void) fprintf(stderr, "%s:Invalid controller name\n",
return (PICL_NODENOTFOUND);
picl2errno(err));
Chapter 1 Watchdog Timer
prog);
17

Advertisement

Table of Contents
loading

Table of Contents